This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
On Solaris, due to fix of issue 22455, the jh.jar is prepended to the bootclasspath, which means its manifest is parsed during the startup using jar:file: URL. Moreover, the workaround from #22455 is active even if I use different JDK which don't link the jh library.
Seems like it is not critical for 3.5, but someone else can decide. ~1000msec (out of how much total?) according to log in issue #31676. Alternative would be to fix #22455 differently - mask javax.help.** and com.sun.java.help.** from the bootclasspath using NbInstaller. Or to remove signatures from jh.jar. What code exactly is parsing it?
it is the code scanning for modules on the classpath, ModuleSystem.loadBootModules() (shortened): ClassLoader loader = ModuleSystem.class.getClassLoader(); Enumeration e = loader.getResources("META-INF/MANIFEST.MF"); // NOI1 while (e.hasMoreElements()) { URL manifestUrl = (URL)e.nextElement(); InputStream is = manifestUrl.openStream(); We are already filtering JDK libraries from this list because of signatures, so we may add a rule for jh (which itself is not a module).
"Seems like it is not critical for 3.5" On the other hand, it is quite cheap startup time improvement. (~1s out of ~20s -> 5%) Trung, please decide.
3.5 is about performance. Jesse please let this fix in. Thx
Also JDK (not JRE) JARs and $nbhome/lib/ext/*.jar were being checked, which they did not need to be; and issue #32576 meant that all these were actually checked twice. Have patch which restricts parsing to just core.jar, openide.jar, and core-windows.jar, which is how it should be. NB's jh.jar is not parsed even if /usr/j2se/opt/javahelp/lib/jhall.jar exists. If you add other modules to the classpath used for core/openide they are however correctly included as before, e.g.: /space/src/nb_all/nbbuild/netbeans/bin/runide.sh -userdir /ram/testme -J-Dorg.netbeans.core.modules=0 -J-Dorg.netbeans.log.startup=print -J-Dnetbeans.classpath=/space/src/nb_all/sysprops/netbeans/modules/sysprops.jar 2>&1 | egrep 'Checking boot manifest:|got all manifests|ignoredPrefixes' [org.netbeans.core.modules #3] ignoredPrefixes=[jar:file:/space/jdk1.4.2-beta-b19/, jar:file:/space/src/nb_all/nbbuild/netbeans/lib/ext/, jar:file:/space/src/nb_all/nbbuild/netbeans/modules/autoload/ext/] @1478 - got all manifests dT=1 [org.netbeans.core.modules #3] Checking boot manifest: jar:file:/space/src/nb_all/sysprops/netbeans/modules/sysprops.jar!/META-INF/MANIFEST.MF [org.netbeans.core.modules #3] Checking boot manifest: jar:file:/space/src/nb_all/nbbuild/netbeans/lib/core.jar!/META-INF/MANIFEST.MF [org.netbeans.core.modules #3] Checking boot manifest: jar:file:/space/src/nb_all/nbbuild/netbeans/lib/openide.jar!/META-INF/MANIFEST.MF [org.netbeans.core.modules #3] Checking boot manifest: jar:file:/space/src/nb_all/nbbuild/netbeans/lib/core-windows.jar!/META-INF/MANIFEST.MF Only tested on Linux so far (JDK 1.3 and 1.4), needs checking on both Solaris and Windows (on both JDK 1.3 and 1.4).
Created attachment 9667 [details] Suggested patch (trunk or r35); no change to jh.jar binary needed
Created attachment 9668 [details] Binary patch; should work in 3.5; save as $nbhome/lib/patches/32303.jar
Petr, I would appreciate a review of the diff.
Created attachment 9672 [details] Slightly refined patch - permits XTest to run correctly; no difference in normal IDE usage
Created attachment 9673 [details] Yet-again-revised patch (previous attachment did not work)
Fixed in trunk: committed Up-To-Date 1.35 core/src/org/netbeans/core/modules/ModuleSystem.java
The patch seems OK to me. Reviewed.
Marian, please verify the patch. If it works consider this as approved by me for r35
patch verified
Merged: ModuleSystem.java 1.33.2.1
Verified startup speedup in release35 branch.