JDK-6801179 : plugin2 does a lot of extra work before relaucnhing VM
  • Type: Enhancement
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u10
  • Priority: P2
  • Status: Resolved
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2009-02-04
  • Updated: 2024-04-12
  • Resolved: 2017-02-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Relates :  
Description
Plugin may start one VM and then later find out that it is not appropriate and start another VM.

The problem is that it does a lot of work before relaunch and this work then repeated in new VM.

This is especially noticeable if javafx applet is requesting 
      <property name="jnlp.packEnabled" value="true"/>
      <property name="jnlp.versionEnabled" value="true"/>
in the JNLP file but does not specify 
      <param name="java_arguments" value="-Djnlp.packEnabled=true -Djnlp.versionEnabled=true">
in the applet tag.

See attached logs for first and second VM instances. 
First launch too 4 second in my experiment. 
Second VM seems to be done with startup in about 3s but there is some time in between of the launches when there were no records in the log. Perhaps it reused some of work done during first but not all.

Note that in this experiment i've used JRE with latest optimizations in the deployment cache
(not yet in the promoted builds) and for non optimized JRE these numbers will be bigger.

Comments
EVALUATION A lot of improvements were made and some more will be made as part of ongoing refactoring efforts. We will revisit this once major refactoring is over.
27-12-2010

EVALUATION The primary focus should be on the number of network connections that are being made. It is likely that both the initial JVM used to download the JNLP file and the relaunched JVM (with the correct command-line arguments) are making network connections to perform up-to-date checks on resources. The deployment cache implementation should be enhanced to allow the Java Plug-In to send messages back to the browser to track the up-to-date status of various resources using an in-memory cache. This would allow up-to-date checks to be coalesced among multiple running JVM instances all attached to the same browser instance. Additionally, the NetBeans plugin should use <update check="background"> in the JNLP files it generates to move some of the up-to-date checks to the background.
04-02-2009

WORK AROUND Avoid relauhching VM.
04-02-2009