Performance issue Java Swing under Windows 7

Hello,
we have MDI Java Swing application running under Window7. We got a big problem with performance in MDI Windows using AERO.
Exist any way for Java to tell Win7 that it should not use Aero??
Thank you,
David.
Edited by: 969767 on 6.11.2012 3:33

If you try to open properties dialog for application (or app shortcut) there you can see "Compatibility" tab and there is check box "Disable visual themes". If we disable this theme our java swing app is very better performance under Windows 7. We need to disable visual theme via java code, if it is possible...
Thanks.

Similar Messages

  • How to embed/perform a Java Swing form into webased Swing form

    How to embed/perform a Java Swing form into webased Swing form or any alternative.
    Suppose i have 2 or more swing forms which are desktop applications but i want those forms to be now webbased..so how can i do this.Will i need to change the swing coding or will have to keep the swing design same.what can be the best Solution.

    You can launch your existing desktop app via the web using [Java Web Start|http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp]

  • Performance issue on swing application

    Hi,
    I have one swing application and i am facing one performance issue after minimizing the applicaton. The same application is taking 2-5 seconds to redraw the screen again when i am trying to maximize it. Is there any way to improve this redraw delay ?..Is there any way to tweak the Event Dispatcher thread and by this we can overcome correct me if i am wrong? .
    Is there anybody facing such kind of issue please help me...
    Thanks in Advance,
    Anish.

    Encephalopathic wrote:
    good guess. What do you think? Loading the images in the painting methods?That is a common mistake. To the OP, some common errors when overriding paintComponent include:
    1. Loading an image each time paintComponent() is called. Just load it once, cache it, and only draw it in paintComponent, this saves you from the IO of loading the image on repaints.
    2. Doing application logic/complex operations in paintComponent. paintComponent should be kept fast, only do painting operations, keep long-running tasks, IO, etc. out of it.
    3. To a lesser extent, doing lots of complex painting on a repaint call, maybe lots of transforms, translucency, xor-ing, whatever. For most common painting (at least in my work, YMMV), this isn't a problem, but if it is you should consider drawing all "static" stuff to a buffer (such as a BufferedImage) and just painting the BufferedImage, as opposed to drawing all the static stuff each paintComponent call.
    The idea is just to keep the painting logic as fast as possible, to avoid slow repaints as you're seeing. Sometimes people don't realize that paintComponent() will be called every time your component needs to be even partially repainted (minimized/maximized window, partially hidden by another window then revealed again, stretched by window resizing, etc.). That's why things like IO are out of the question.
    Of course, I'm babbling now. This may not even be your problem, or you may already know all this stuff. If so, just ignore this post!

  • Performance issue with Loop under Loop

    Hi,
    I have an issue with the performance, as per the requirement I have to use the Loop under Loop logic.
    I have sorted the Where condition field in Parent Loop and also in Child Loop like below :
    SELECT GUID_PRCTSC   "Primary Key as GUID in "RAW" Format
             GUID_PR       "Primary Key as GUID in "RAW" Format
             STCTS         "Numbering Scheme for Customs Tariff System
             DATAB         "Definitive Date (Valid-From Time)
             GUID_CTSNUMC  "Primary Key as GUID in "RAW" Format
             FROM /SAPSLL/PRCTSC
             INTO TABLE T_PRCTSC
             WHERE STCTS IN S_STCTS.
      IF T_PRCTSC IS INITIAL.
        MESSAGE : I007(ZMSSG) WITH 'Data not available for this entry'.
        STOP.
      ENDIF.
    SORT T_PRCTSC BY GUID_PR.
      SELECT GUID_PRGEN  "Primary Key as GUID in "RAW" Format "+  DG1K902277
             GUID_PR     "Primary Key as GUID in "RAW" Format
             ATTR05A     "Materail Type
             ATTR05B     "Sub-Family
             ATTR05C     "SPEC BUS + DG1K902190
             ATTR10A     "Materail Group
             ATTR20A     "SUBSTANCE ID
             FROM /SAPSLL/PRGEN
             INTO TABLE T_PRGEN
             FOR ALL ENTRIES IN T_TCOATV20
             WHERE ATTR20A EQ T_TCOATV20-ATTRV20
               AND ATTR05A IN S_ATR5A " +DG1K902168
               AND ATTR05C IN S_ATR5C. " + DG1K902190
      IF T_PRGEN IS INITIAL.
        MESSAGE : I007(ZMSSG) WITH 'Data not available for this entry'.
        STOP.
      ENDIF.
    *N-23
    SORT T_PRGEN BY GUID_PR.
    There are 90,000 records available in the table T_PRGEN.
    LOOP AT T_PRGEN INTO WA_PRGEN.
        IF SY-SUBRC = 0.
           WA_FINAL-ATTR05A       = WA_PRGEN-ATTR05A.
           WA_FINAL-ATTR05B       = WA_PRGEN-ATTR05B.
           WA_FINAL-ATTR05C       = WA_PRGEN-ATTR05C. " + DG1K902190
           WA_FINAL-ATTR10A       = WA_PRGEN-ATTR10A.
           WA_FINAL-ATTR20A       = WA_PRGEN-ATTR20A.
        ENDIF.
        READ TABLE T_V_TCAV201 INTO WA_V_TCAV201 WITH KEY ATTRV20 = WA_PRGEN-ATTR20A.
        IF SY-SUBRC = 0.
          WA_FINAL-TEXT1   = WA_V_TCAV201-TEXT1.    "SUBID-TEXT1
        ENDIF.
        READ TABLE T_PNTPR INTO WA_PNTPR WITH KEY GUID_PR = WA_PRGEN-GUID_PR.
        IF SY-SUBRC = 0.
           WA_FINAL-PRVSY  = WA_PNTPR-PRVSY.   "PROD NO
           WA_FINAL-GRVSY  = WA_PNTPR-GRVSY.   "LOGICAL SYS GROUP
        ENDIF.
    * TO Remove the Leading Zeros from prvsy
        SHIFT WA_FINAL-PRVSY LEFT DELETING LEADING '0'.
        READ TABLE T_CORSTA INTO WA_CORSTA WITH KEY GUID_MOBJ = WA_PNTPR-GUID_PR.
        IF SY-SUBRC = 0.
          WA_FINAL-QUAL_STA  = WA_CORSTA-QUAL_STA.
        ENDIF.
        READ TABLE T_PR INTO WA_PR WITH KEY GUID_PR = WA_PNTPR-GUID_PR.
    *& IN THE PROD MASTER PRODUCT CHANGED ON VALUE HAS BEEN   &
    *& MAINTAINED AS SINGLE '0', THIS WILL CAUSE ISSUES WHILE &
    *&  USING CONVERSION EXIT TO DISPLAY THE DATE FORMAT IN   &
    *&  MM/DD/YYYY HH:MM:SEC                                  &
        IF SY-SUBRC = 0.
          IF WA_PR-CHTSP = '0'.
            WA_FINAL-CRTSP   = WA_PR-CRTSP.
            wa_final-chtsp   = W_DATE.
          ENDIF.
          IF WA_PR-CHTSP NE '0'.
            WA_FINAL-CRTSP   = WA_PR-CRTSP.
            wa_final-chtsp   = WA_PR-CHTSP.
          ENDIF.
        ENDIF.
        READ TABLE T_PRT INTO WA_PRT WITH KEY GUID_PR = WA_PR-GUID_PR.
        IF SY-SUBRC = 0.
          WA_FINAL-PRTXT   = WA_PRT-PRTXT.
        ENDIF.
    LOOP AT T_PRCTSC INTO WA_PRCTSC WHERE GUID_PR = WA_PRGEN-GUID_PR. "+DG1K902258  - Performance issue
            IF SY-SUBRC = 0.
    *& TO FILL ATTR20A,PRVSY FOR DIFF STCTS AND CCNGN FOR     |
    *&  EACH LOOP                                             |
              IF WA_FINAL-ATTR20A  IS INITIAL
              AND  WA_FINAL-PRVSY IS INITIAL.
                IF WA_PRGEN-GUID_PR = WA_PNTPR-GUID_PR. "This condition is to fill up all the rows for the same
                                                        " Subid which have multiple stcts fields.
               IF SY-SUBRC = 0.
                  WA_FINAL-ATTR05A       = WA_PRGEN-ATTR05A.
                  WA_FINAL-ATTR05B       = WA_PRGEN-ATTR05B.
                  WA_FINAL-ATTR05C       = WA_PRGEN-ATTR05C. " + DG1K902190
                  WA_FINAL-ATTR10A       = WA_PRGEN-ATTR10A.
                  WA_FINAL-ATTR20A       = WA_PRGEN-ATTR20A.
                 ENDIF.
                  IF SY-SUBRC = 0.
                    WA_FINAL-TEXT1   = WA_V_TCAV201-TEXT1.    "SUBID-TEXT1
                  ENDIF.
                  IF SY-SUBRC = 0.
                    WA_FINAL-PRVSY  = WA_PNTPR-PRVSY.   "PROD NO
                    WA_FINAL-GRVSY  = WA_PNTPR-GRVSY.   "LOGICAL SYS GROUP
                  ENDIF.
    * TO Remove the Leading Zeros from prvsy
                  SHIFT WA_FINAL-PRVSY LEFT DELETING LEADING '0'.
                  IF SY-SUBRC = 0.
                    WA_FINAL-QUAL_STA  = WA_CORSTA-QUAL_STA.
                  ENDIF.
                  IF SY-SUBRC = 0.
                    IF WA_PR-CHTSP = '0'.
                      WA_FINAL-CRTSP   = WA_PR-CRTSP.
                      WA_final-chtsp   = W_DATE.
                    ENDIF.
                    IF WA_PR-CHTSP NE '0'.
                      WA_FINAL-CRTSP   = WA_PR-CRTSP.
                      WA_final-chtsp   = WA_PR-CHTSP.
                    ENDIF.
                  ENDIF.
                  IF SY-SUBRC = 0.
                    WA_FINAL-PRTXT   = WA_PRT-PRTXT.
                  ENDIF.
                ENDIF.
              ENDIF.
          IF SY-SUBRC = 0. " + DG1K902198
                WA_FINAL-GUID_PR      = WA_PRCTSC-GUID_PR.
                WA_FINAL-STCTS        = WA_PRCTSC-STCTS.
                WA_FINAL-DATAB        = WA_PRCTSC-DATAB.       " + DG1K902198
              ENDIF.
             READ TABLE T_CTSNUMC INTO WA_CTSNUMC WITH KEY GUID_CTSNUMC = WA_PRCTSC-GUID_CTSNUMC.
              IF SY-SUBRC = 0.
                WA_FINAL-CCNGN        = WA_CTSNUMC-CCNGN.
              ENDIF.
              APPEND WA_FINAL TO T_FINAL.
              CLEAR WA_FINAL.
            ENDIF.
        ENDLOOP.
        APPEND WA_FINAL TO T_FINAL.
        CLEAR WA_FINAL.
      ENDLOOP.
    Any suggestions to improve the performance will be appreciated!
    Thanks & Regards,
    Kittu
    Edited by: Kittu on Mar 23, 2009 4:03 PM

    Hi
    Instead of using the LOOP under LOOP directly. use the read statement for second loop and from that index u start the loop.
    eg:
    LOOP AT ITAB1.
    read table itab2 with key field1 = itab1 - field1.
    if sy-subrc = 0.
    loop at itab2 index sy-tabix.
    if  itab2-field1 = itab1 - field1.
    < do u  r operations >
    else.
      exit.
    endif.
    ENDLOOP.
    this will increase the performance

  • Performance issue: Java and XSLT

    I have a performance issue concerning Java and XSLT: my goal is to transform an xml file (source.xml)
    by using a given xsl file (transformation.xsl). As result I would like to get a String object, in which the result
    of the transformation (html-code) is in, so that I can display it in a browser. The problem is the long time
    it takes for the code below to run through.
    xml = new File("C:\\source.xml");
    xmlSource = new StreamSource(xml);
    xslt = new File("C:\\transformation.xsl");
    StreamSource xsltSource = new StreamSource(xslt);
    TransformerFactory transFact = TransformerFactory.newInstance();
    trans = transFact.newTransformer(xsltSource);
    StringWriter stringWriter = new StringWriter();
    StreamResult streamResult = new StreamResult(stringWriter);
    trans.transform(xmlSource, streamResult);
    String output = stringWriter.toString();
    stringWriter.close();
    Before, I made the same transformation in an xml development environment, named Cooktop
    (see http://xmlcooktop.com/). The transformation took about 2 seconds. With the code above in Java it
    takes about 20 seconds.
    Is there a way to make the transformation in Java faster?
    Thanks in advance,
    Marcello
    Oldenburg, Germany
    [email protected]

    I haven't tried it but the if you can use java 6, you could try the new stax (StAX) with the XML stream loading..
    Take a look at:
    http://javaboutique.internet.com/tutorials/staxxsl/
    Then, you could cache the xslt in templates:
    ---8<---
    templates = transformerFactory.newTemplates( xsltSource );
    Transformer transformer = templates.newTransformer();
    (here you could probobly also cache the Transformer object but I think it's it's not thread safe so it's a little tricker..)
    StreamResult result = new StreamResult( System.out );
              transformer.transform(xmlSource, result);
    And, don't transform your result to a string, use a Stream or something, then the transformer could start pumping out html while working, and if you get a out of memory error it looks like you have a pretty big xml file...
    If you use jsp you could try the build in jsp taglib for xml which I think is rather good and they have support for varReader which implements the StreamSource iirc.
    /perty

  • Performance of Java Swing Vs Ajax ( Java Script )

    We had developed application in swing which displays the data received after querying to web-service in Table and JTrees.
    The current technological move is toward Ajax, It is ok that I can build this application in Ajax but not willing to go for replacment to swing.
    I had following question, why should I go for Ajax over swing considering my type of application only ( beside plugins,JRE.. )?
    And Peformance of Java script ( AJAX ) application over swing on following gorund?
    1. Rendering of components in Swing & HTML ( browser )
    2. Peformance of Java Script over Java ( CPU, Memory usage )
    3. Event model in Java Script over java swing
    4. Multitasking & Multithreading.
    5. Storing data in variables.

    The advantage of AJAX over Swing is clear, no special software is needed on a client computer other than an up to date browser.
    Swing does have some advantages however in that it is much more established and there are many more tools available for developing a front end GUI application in Swing.
    I have yet to find what I consider a "good" IDE for Javascript development on multiple platforms, Eg. IE, Firefox, etc...
    Javascript is also not truly object oriented and that makes organizing your code and your design harder.
    Performance I feel is a moot point between the two as it would hardly be noticeable, however I would guess that Javascript might have less performance than Java.

  • Java Swing and windows listview control

    Hi,
    many programming languages have the listview control, to which you can define diferents kinds of data's organizers as Icon, Detail, List, etc.
    Somebody knows if java swing have a component as the listview ?
    thanks

    Yes. It's called JList. Have a look at the tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/index.html

  • Form become white after running java app. under windows XP

    Hi,
    i developed an application (Form base application) that connect to FTP server and connect to a server via telnet.
    The application is running fine until i'm trying to run it under Windows XP.
    when i'm running the applicaion under windows XP and sending data, the form become WHITE (looks like stuck program).
    the app. is still running but the user think the app. is stuck.
    i try to INVALIDATE the form every time the loop is sending the data and many more ideas but it is still become white.
    the app. is working greate under windows 2000, 98, ME.
    does anyone know this problem and how to fix it?
    Thanks Guy.

    i "just" develope an application that connected to an exsiting servers and upload data to them.
    the problem is that when i run this app. under windows XP, the screen ( the application created in "Form Base") become white, like the program is stuck.
    there is no error, it's seems to be an invalidate problem, but i try to out invalidate everywhere but it is still doen't fix this problem.
    the app. doesnot stuck, it is just looks like that!!!!!
    the weird thing is when i run this app. under all other windows, it's working fine.
    if anything is not clear, write back.
    thanks.

  • Java Swing and WIndows User Localles

    HI,
    We need to develop a java applet/application which can be switchable at run time to accept and display characters in multilanaguages. This java applet will run on a windows 2000 server with multilanguage pack installed. Is it possible to dynamically switch languages at run time. The machines default localle and operating system installation is US English.
    We have tried some tests with traditional chinese and UI components in Swing but with no success in displaying or inputing valid chinese characters. Has anyone attempted a simliar thing and have any insights that may help.
    Thanks in Advance,
    Jono

    Yes. It's called JList. Have a look at the tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/index.html

  • Is there an issue with Swing on Windows 7?

    Hi,
    I'm running the latest version of Java on Windows 7. "java -version" returns the following:
    java version "1.6.0_21"
    Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
    Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode, sharing)
    However, when I try to run the JDialog example at "http://download-llnw.oracle.com/javase/1.5.0/docs/api/" (JDialog | How to Make Dialogs | The DialogDemo Example), it is not being painted correctly.
    I have a dual monitor setup. The display adapter is an NVIDIA GeForce FX5200. Is this a Windows 7 issue, or is something going wrong with my display adapter?
    Thanks very much.

    In short, components are not being painted fully or at all. If I mouse over the dialog (which I'm guessing forces a repaint), sometimes a given component will appear. In any case, it's not subtle. You would definitely notice it if it were occurring.
    Thanks for having a look though. I guess I will try re-installing the JRE or research possible issues with my video card.

  • A tiny font is used in many places across Java Swing applications (help!)

    In many places in Java but mostly in text boxes I'm seeing a very small font that is quite hard to read.
    I am seeing this all over the place in Java programs and it is getting on my nerves.
    I'm not sure what is causing this.
    I also encountered this issue when running Java on Windows XP.
    I really need help on how to solve this,
    Or maybe it is actually a bug with Java itself and Windows?
    An image of the problem in SwingSet2:
    [SwingSet 2 Tiny Font Example|http://img687.imageshack.us/img687/1373/swingset2tinyfont.png]
    System spec:
    Windows 7 Professional 32-bit (Aero is on)
    Java 6 Update 20
    English system locale and language
    No special dpi settings (default)
    Screen Resolution: 1280x1024
    Avast Antivirus 5.0
    An intel graphics card
    Edited by: Temp111 on May 9, 2010 7:38 AM

    camickr wrote:
    That is not a problem. Somewhere in that code the programmer uses setFont(....) to make it a smaller font. The default font of a text component does not behave like that.
    For more help create a [SSCCE (Short, Self Contained, Compilable and Executable, Example Program)|http://sscce.org/], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.No, it's defiantly a problem. Probably in the default fonts that Swing uses in some places.
    I detected one place where I can easily trigger this issue, a JTextArea And the Windows Look and Feel, So here is a SSCCE for you:
    [Picture Of Tiny Font SSCCE With Tiny Font issue|http://img88.imageshack.us/img88/7876/tinyfont.png]
    import javax.swing.JFrame;
    import javax.swing.JTextArea;
    import javax.swing.UIManager;
    import javax.swing.UnsupportedLookAndFeelException;
    public class TinyFont {
         public static void main(String[] args) {
              try {
                   UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
              } catch (ClassNotFoundException e) {
                   e.printStackTrace();
              } catch (InstantiationException e) {
                   e.printStackTrace();
              } catch (IllegalAccessException e) {
                   e.printStackTrace();
              } catch (UnsupportedLookAndFeelException e) {
                   e.printStackTrace();
              JFrame frame = new JFrame("Tiny Font");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JTextArea textArea = new JTextArea("Tiny Font Test");
              frame.add(textArea);
              frame.setSize(150, 100);
              frame.setLocationRelativeTo(null);
              frame.setVisible(true);
    }But I also encountered this issue in other places that use Swing.
    Try SwingSet2 Source Code Tab for example: [SwingSet2|http://java.sun.com/products/jfc/jws/SwingSet2.jnlp]

  • Installing a Java Application under  Win2000

    Hi,
    I would like to automate the installation of a Java Application under Windows 2000, so that the user is prompted for a destination folder and the application appears in his Start->Games folder.
    Shoud I use install Shield or can I use something java based for this purpose. In any case can you point me to material on the web that discuss these types of topics.
    Thanks.

    ZeroG software has a great Installer for Java. It creates installers for Unix, Windows, MacOS and others. http://www.zerog.com.
    They have a free installer also; its light on features but has worked really well for us for simple gui apps.
    - Chris

  • POA performance issues under windows 2008 R2

    Hello - we are running GW 8.02 hp3 and recently moved our main post office (~600 users) from Netware to Windows 2008 R2 (running under Vsphere 4.1).
    We have started seeing intermittent slow performance issues esp. when moving a message from one folder to another, or sending a broadcast email.
    It doesn't appear to be a hardware resource issue: disk queues don't exceed 1, with low latency (7-15ms) and we're not cpu or memory bound (that I can see).
    Here are our current config settings:
    Message Worker Threads: 15
    Maximum GWCheck Worker Threads: 8
    C/S Handler Threads: 30
    Max Physical: 2048
    Max App Connections: 4084
    Soap Threads: 20
    We don't see any serious errors in the logs when performance becomes slow. Could this just be a tuning issue?

    In article <[email protected]>, Javerkio wrote:
    > we are running GW 8.02 hp3 and recently moved our main post
    > office (~600 users) from Netware to Windows 2008 R2 (running under
    > Vsphere 4.1).
    >
    Windows is the lowest performing host for GroupWise, so that is a part
    of what you are hitting.
    How are you monitoring memory usage? I've found that the vCenter tools
    aren't a good indicator of that, where as the Windows tools are better
    in that respect. The biggy is that you don't want much paging to disk.
    How much do you have assigned to this VM?, how many cores? And are
    these ESX box(es) over committed on those two?
    Those settings on their own don't really mean a whole lot. What we need
    to see is what is actually being used, and if you are running out of
    them, then upping those specific numbers can help. The best way is to
    watch the POA web interface for the relevant settings.
    http://hostnameorIP:7181/
    Andy Konecny
    Knowledge Partner (voluntary SysOp)
    KonecnyConsulting.ca in Toronto
    Andy's Profile: http://forums.novell.com/member.php?userid=75037

  • Performance issues with class loader on Windows server

    We are observing some performance issues in our application. We are Using weblogic 11g with Java6 on a windows 2003 server
    The thread dumps indicate many threads are waiting in queue for the native file methods:
    "[ACTIVE] ExecuteThread: '106' for queue: 'weblogic.kernel.Default (self-tuning)'" RUNNABLE
         java.io.WinNTFileSystem.getBooleanAttributes(Native Method)
         java.io.File.exists(Unknown Source)
         weblogic.utils.classloaders.ClasspathClassFinder.getFileSource(ClasspathClassFinder.java:398)
         weblogic.utils.classloaders.ClasspathClassFinder.getSourcesInternal(ClasspathClassFinder.java:347)
         weblogic.utils.classloaders.ClasspathClassFinder.getSource(ClasspathClassFinder.java:316)
         weblogic.application.io.ManifestFinder.getSource(ManifestFinder.java:75)
         weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java:67)
         weblogic.application.utils.CompositeWebAppFinder.getSource(CompositeWebAppFinder.java:71)
         weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java:67)
         weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java:67)
         weblogic.utils.classloaders.CodeGenClassFinder.getSource(CodeGenClassFinder.java:33)
         weblogic.utils.classloaders.GenericClassLoader.findResource(GenericClassLoader.java:210)
         weblogic.utils.classloaders.GenericClassLoader.getResourceInternal(GenericClassLoader.java:160)
         weblogic.utils.classloaders.GenericClassLoader.getResource(GenericClassLoader.java:182)
         java.lang.ClassLoader.getResourceAsStream(Unknown Source)
         javax.xml.parsers.SecuritySupport$4.run(Unknown Source)
         java.security.AccessController.doPrivileged(Native Method)
         javax.xml.parsers.SecuritySupport.getResourceAsStream(Unknown Source)
         javax.xml.parsers.FactoryFinder.findJarServiceProvider(Unknown Source)
         javax.xml.parsers.FactoryFinder.find(Unknown Source)
         javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
         org.ajax4jsf.context.ResponseWriterContentHandler.<init>(ResponseWriterContentHandler.java:48)
         org.ajax4jsf.context.ViewResources$HeadResponseWriter.<init>(ViewResources.java:259)
         org.ajax4jsf.context.ViewResources.processHeadResources(ViewResources.java:445)
         org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:193)
         org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
         org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
    On googling this seems to be an issue with java file handling on windows servers and I couldn't find a solution yet. Any recommendation or pointer is appreciated

    Hi shubhu,
    I just analyzed your partial Thread Dump data, the problem is that the ajax4jsf framework ResponseWriterContentHandler triggers internally a new instance of the DocumentBuilderFactory; every time; triggering heavy IO contention because of Class loader / JAR file search operations.
    Too many of these IO operations under heavy load will create excessive contention and severe performance degradation; regardless of the OS you are running your JVM on.
    Please review the link below and see if this is related to your problem.. This is a known issue in JBOSS JIRA when using RichFaces / ajaxJSF.
    https://issues.jboss.org/browse/JBPAPP-6166
    Regards,
    P-H
    http://javaeesupportpatterns.blogspot.com/

  • Performance Issue in NetworkInterface.getNetworkInterface in windows JRE 7

    NetworkInterface.getNetworkInterface() call takes 10 times more time when run in Windows JRE 7. The same call runs much faster in JRE 6.
    Sample Program,
    I wrote a small program which just fetches the network interfaces using java.net.NetworkInterface.getNetworkInterfaces() as below,
    ------------------------------------ Program Start ------------------------------------
    import java.net.*;
    import java.util.*;
    public class PerfNetTest {
    public static void main(String args[]) throws Exception {
         long startTime = System.currentTimeMillis();     
         Enumeration niEnum = NetworkInterface.getNetworkInterfaces();          
         long endTime = System.currentTimeMillis();     
         System.out.println ( "Total Time Taken For One Call: " + (endTime-startTime));          
         startTime = System.currentTimeMillis();          
         for (int i = 0; i < 10; i++) {
              niEnum = NetworkInterface.getNetworkInterfaces();
         endTime = System.currentTimeMillis();     
         System.out.println ( "Total Time Taken For Ten Call: " + (endTime-startTime));          
    ------------------------------------ Program End ------------------------------------
    Compiled the above code in Java 6 and ran the above program in JRE 6 and JRE 7. JRE 7 takes approximately 10 times more time than JRE 6. This leads to a huge performance issue in our project.
    I ran it 5 times in each JRE versions and below are the test results,
    When run in JRE 6
    c:\test\net>java PerfNetTest
    Total Time Taken For One Call: 18
    Total Time Taken For Ten Call: 81
    c:\test\net>java PerfNetTest
    Total Time Taken For One Call: 17
    Total Time Taken For Ten Call: 80
    c:\test\net>java PerfNetTest
    Total Time Taken For One Call: 19
    Total Time Taken For Ten Call: 80
    c:\test\net>java PerfNetTest
    Total Time Taken For One Call: 18
    Total Time Taken For Ten Call: 79
    c:\test\net>java PerfNetTest
    Total Time Taken For One Call: 18
    Total Time Taken For Ten Call: 80
    When run in JRE 7
    c:\test\net>java PerfNetTest
    Total Time Taken For One Call: 98
    Total Time Taken For Ten Call: 891
    c:\test\net>java PerfNetTest
    Total Time Taken For One Call: 100
    Total Time Taken For Ten Call: 869
    c:\test\net>java PerfNetTest
    Total Time Taken For One Call: 98
    Total Time Taken For Ten Call: 859
    c:\test\net>java PerfNetTest
    Total Time Taken For One Call: 99
    Total Time Taken For Ten Call: 871
    c:\test\net>java PerfNetTest
    Total Time Taken For One Call: 99
    Total Time Taken For Ten Call: 888
    Is there any other way to optimize the performance in JRE 7 internally, Can the above issue considered as a bug with Windows JRE 7? Can I go and submit a bug for this?

    I have simplified the program to point out the exact issue. In the actual usage we need to know immediately or whenever there is an ip change, it might be because of the change in ip to same nic card or when connected to a network via any of the nic card (wifi enabled, etc).
    Overall it is particularly important to as we used to get the NetworkInterfaces for every features. As a result of this, 60 feature which gets executed roughly around .5 milliseconds in java6, now consumes almost 6-10 seconds in java 7.
    Also in our client server application, where client queries for NetworkInterfaces and further sends a requests to the server where we have to support at least 100 transaction per seconds(TPS for complete client-server throughput), with 100's of client systems querying for its own NetworkInterface is consuming time and certainly reduces the overall throughput.
    Currently I am more inclined to cache it and refresh in a separate thread internally, but certainly I wanted to avoid it because the throughput will be less for the first request and especially when it works perfectly fine with java6.
    Edited by: Niran on Jun 28, 2012 3:08 AM

Maybe you are looking for

  • Selecting a Skype number

    Hi I'm a bit new to all this Skyping lark, so please bear with me if my question has been asked before or I appear terminally stupid! I live in the UK, but will be travelling in North America (USA and Canada) soon.  Because my UK mobile phone provide

  • Pixma MG7120 CANCEL BUTTON?How do I clear a paper jam trying to set up new printererror code 6000

    Just pruchased 7120. Doing set up  got  to the add paper  for alignment The  paper jammed and code says hit cancel  button and restart.  There is no cancel button . I cant clear the paper jam  and the only  button to access is the on/off button. Says

  • Creating a DVD movie

    Trying to create a movie dvd. I select the project and click on share. The drop down list does not have IDVD as an option. I can right click on the project and get a drop down list that has "share idvd" as an option. After clicking this option it pro

  • PLEASE HELP. Syncing my brothers iTunes music to MY iPhone.

    So I'm trying to sync my brothers iTunes music (iPhone 4 user with his iTunes on his own computer) to my phone ( with my phone synced to my computer. We are on vacation and only have his computer. Is there a way to get his music onto my phone without

  • Text area no longer has wordwrap on developer eddition?

    I use the deveooper's edition of FF (like the debugger FYI) but i've got a problem now. since the upgrade today, text areas in some of the forums I visit no longer have wordwrap in them. I checked the settings and can't find them. I also searched the