EVALUATION
All the details are available in BugDB:
https://bug.oraclecorp.com/pls/bug/webbug_print.show?c_rptno=13059819
In short, the investigation discovered the following hot spot responsible
for this performance degradation:
sun.plugin.net.protocol.jar.CachedJarURLConnection.connect()
For example, in Test 3 with JDK 6u31 this method consumed 58%
of CPU time (with JDK 5u18 it was about 0%). This is actually pretty close
to the size of the performance regression itself. Here is the problematic
stack trace:
...
java.net.URL.getContent()
sun.plugin.net.protocol.jar.CachedJarURLConnection.getContent()
sun.plugin.net.protocol.jar.CachedJarURLConnection.connect()
sun.net.www.protocol.jar.JarURLConnection.connect()
sun.net.www.protocol.jar.JarFileFactory.get(URL, boolean)
sun.net.www.protocol.jar.URLJarFile.getJarFile(URL,
URLJarFile$URLJarFileCloseController)
sun.net.www.protocol.jar.URLJarFile.retrieve(URL,
URLJarFile$URLJarFileCloseController)
sun.plugin.PluginURLJarFileCallBack.retrieve(URL)
sun.plugin.PluginURLJarFileCallBack$2.run()
sun.plugin.PluginURLJarFileCallBack.access$000(PluginURLJarFileCallBack,
URLConnection, String, boolean)
sun.plugin.PluginURLJarFileCallBack.downloadJAR(URLConnection, String, boolean)
java.io.FilterInputStream.read(byte[])
...
In the current design this operation involves too much disk I/O (called by
sun.plugin.PluginURLJarFileCallBack.downloadJAR()).
The fix is to skip this unnecessary I/O, if the requested JAR file already exists
in Java Deployment Cache.
In JRE 7uX and 8 a more complete solution is already available. It is tracked as
CR 7162188. So, this fix does not need to be forward-ported to JRE 7uX/8.
|