Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6996266

Performance issue on BasicService.showDocument

XMLWordPrintable

    • 6
    • b126
    • x86
    • windows_7
    • Verified

        * FULL PRODUCT VERSION :
        java version "1.6.0_21"
        Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
        Java HotSpot(TM) 64-Bit Server VM (build 17.0-b17, mixed mode)

        * ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows [version 6.1.7600]
        Microsoft Windows XP [version 5.1.2600]

        * A DESCRIPTION OF THE PROBLEM :
        We identified a performance regression affecting any version of Java 6 compared to Java 5.

        Using Java 5, a call to BasicService.showDocument takes few milliseconds, using java 6, it takes more than 5 seconds.

        * STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Simply use the showDocument method in a Java WebStart application, capture the time this method takes to execute.

        * EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        Trace of the provided sample code using Java 5 (any version)

        Write file on disk jsp.txt = 15ms
        Basic service lookup : 0ms
        Show document with Java webstart (jsp.txt) = 0ms
        ACTUAL -
        Trace of the provided sample code using Java 6 (any version):

        Write file on disk jsp.txt = 47ms
        Basic service lookup : 0ms
        Show document with Java webstart (jsp.txt) = 4531ms

        * REPRODUCIBILITY :
        This bug can be reproduced always. A full test case is attached:

        ---------- BEGIN SOURCE ----------
        Here is an excerpt of an application that recreates the problem.

        long startBasicServiceLookup = System.currentTimeMillis();
        BasicService bs = (BasicService) ServiceManager.lookup("javax.jnlp.BasicService");
        long endBasicServiceLookup = System.currentTimeMillis();
        log.append("Basic service lookup : " + (endBasicServiceLookup-startBasicServiceLookup) + "ms"+newline);
                             
        long startShowDocument = System.currentTimeMillis();
        bs.showDocument(file);
                             
                          
        long endShowDocument = System.currentTimeMillis();
        log.append("Show document with Java webstart ("+ fileContents.getName() +") = " + (endShowDocument-startShowDocument) + "ms"+newline);
        ---------- END SOURCE ----------

              ccheung Calvin Cheung
              cteissed Claude Teissedre (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: