JDK-4747365 : Avoid Manifest parsing
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2002-09-13
  • Updated: 2018-10-22
  • Resolved: 2002-10-25
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
1.4.2 mantisFixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Investigation into traces of J2SE startup time has shown that parsing
of jar file manifests consumes a significant portion of startup time
for both non-GUI and GUI applications. Manifests are currently parsed
by the core libraries for two reasons. The first is done by the
URLClassPath to check to see whether a class-path attribute is present
and whether dependent jars may need to be opened. The second is done
by the JarFile implementation during construction of a JarVerifier;
jars are verified by default so JarVerifiers are always constructed.

None of the jars shipped by Sun in jre/lib/ext contain class-path
attributes, so for most Java installations manifests do not need to be
parsed for this reason. JarVerifiers are used to verify signed jar
files and have no effect for unsigned jars. None of the core jars Sun
ships in jre/lib/ext which are loaded during startup of simple
applications are signed, so we can plausibly avoid JarVerifier
construction for these jars.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis mantis-b05 VERIFIED IN: mantis
14-06-2004

WORK AROUND
11-06-2004

SUGGESTED FIX
11-06-2004

PUBLIC COMMENTS
10-06-2004

EVALUATION ###@###.### has implemented a hand-coded Boyer-Moore string search through the manifest for a class-path attribute. This is used by URLClassPath before parsing the manifest fully. This gains most of the speedup to be had. Additionally, the jars Sun ships in jre/lib/ext have been made known to the implementation so they are not scanned at all. The JarFile implementation has been changed to scan the META-INF directory for signature files and if none are present a JarVerifier is not created. This avoids parsing of manifests completely for GUI applications. These optimizations save 6.9% of startup time for Hello, World and 5.7% on Notepad. Implemented in 1.4.2. ###@###.### 2002-09-13
13-09-2002