JDK-6235792 : (cl) improve performance penalty of loading classes from CLASSPATH versus BOOTCLASSPATH
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang:class_loading
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-03-03
  • Updated: 2016-06-16
  • Resolved: 2016-06-16
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.
JDK 9
9Fixed
Related Reports
Relates :  
Description
There is a significant performance penalty when classes are loaded
from the application classloader rather than from the BOOTCLASSPATH.

A microbenchmark measured 60% performance increase when loaded classes
were placed on the BOOTCLASSPATH.

A custom version of Netbeans 4.1 was measured to startup 12% faster when 
all of it's classes were placed on the BOOTCLASSPATH.


###@###.### 2005-03-03 20:15:45 GMT

Comments
With the module system (JEP 261), the built-in class loader skips parent delegation if a class is found from a module defined by that class loader. Otherwise it will delegate to the parent. For classes found in a module defined by one of the built-in class loader, the delegation cost is much lower than in JDK 8 because it maintains the package map of all modules a built-in class loader defines. The bootstrap class loader will scan classes in -Xbootclasspath/a which is not frequently used. In addition, the built-in class loader in JDK 9 does not throw CNFE when a class is not found and that reduces the delegation overhead. jimage lookup cost and the cost of reading a resource is much lower than JAR file. Adding all these together the class loading performance due to delegation is improved in JDK 9. Close as fixed in JDK 9.
16-06-2016

EVALUATION It's too late to address this in Mustang.
09-06-2006