United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6668037 Slow client JVM initialization at applet launch time
JDK-6668037 : Slow client JVM initialization at applet launch time

Details
Type:
Bug
Submit Date:
2008-02-26
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2008-06-27
Component:
deploy
OS:
generic
Sub-Component:
plugin
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u10 (b21)

Related Reports
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
The user experience of the applet launch time shall be at least very close to the performance of the legacy plugin.

A new client JVM is launched in case that no suitable JVM is running,
which would satisfy the to be launched applet.

Launching and initializing a new client JVM currently takes about 2 seconds, 
which is not acceptable and above the legacy startup time.

                                    

Comments
EVALUATION

Slow JVM startup time degrades the user experience for OOPP applet,
since loading applet's as additional web content shall not
disturb the user experience.
                                     
2008-03-15
SUGGESTED FIX

See CR 6675834, where the Fix is implemented!

Results: *** 2015 ms JVM starup time boost ***
    - Removing the costly Trace.flush() boosts the startup time about ** 1800 ms **

    - Replacing JavaRunTime.initEnvironment() with the only necessary initialization
        - Replacing AppletViewer.loadPropertiesFiles() - boosts startup time about ** 100 ms **,
          Where the specific codepath is reduced by 200 ms.

    - Fast path for : CacheUpdateHelper.updateCache() call - boosts startup time about ** 115 ms **
        - extracting the condition IF(Config.getBooleanProperty(Config.JAVAPI_UPDATE_KEY))
          out of the new process, so the new process is created only, if necessary!

    - Show Console costs about 299 ms, i.e. +79% of the startup time, compared to no SHOW
                                     
2008-03-15
SUGGESTED FIX

6668037 : Slow client JVM initialization at applet launch time

Details, see: 'src/plugin/share/classes/sun/plugin2/doc/Applet2StartupTime.txt'

Results: *** 2015 ms JVM starup time boost ***
    - Removing the costly Trace.flush() boosts the startup time about ** 1800 ms **

    - Replacing JavaRunTime.initEnvironment() with the only necessary initialization
        - Replacing AppletViewer.loadPropertiesFiles() - boosts startup time about ** 100 ms **,
          Where the specific codepath is reduced by 200 ms.

    - Fast path for : CacheUpdateHelper.updateCache() call - boosts startup time about ** 115 ms **
        - extracting the condition IF(Config.getBooleanProperty(Config.JAVAPI_UPDATE_KEY))
          out of the new process, so the new process is created only, if necessary!

    - Show Console costs about 299 ms, i.e. +79% of the startup time, compared to no SHOW

Applet Stop behavior:
     - Reduced STOP_TIMEOUT to 200ms !
       Experience shows that until AppContext.dispose() only 10ms were consumed.
       Therefor the phenomenon of a  slow applet stop() is related to the AppContext destruction,
       for which we don't wait longer than STOP_TIMEOUT - 10ms.

+++

Proper DeployPerfUtil initilization and generic PerfHelper

- initialize DeployPerfUtil, if enabled
- using a generic PerfHelper implementation for non Windows
    - no native Unix implementation, which does anything yet
    - using nanoseconds if JRE>=1.5, else milliseconds
    - storing and showing time in microseconds
                                     
2008-03-16



Hardware and Software, Engineered to Work Together