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.
It seems that getPackage can be quite slow when called from a class loader with deeply nested dependencies; e.g. class loading for a module like jwd seems to be much slower than for modules with few dependencies. Possibly some sort of Fibonacci recursion is happening. Find some way to speed up class loader inheritance search generally, or at least optimize getPackage specially - the domain cache search does not seem to work for it currently.
Initial patch seems to help on NB: Average times: unoptimized 10.7500821908315 std. dev. 0.0138244002751103 optimized 10.4460347970327 std. dev. 0.0164806646809395 Improvement: 0.304047393798829 Percentage: 2.8283262248743% Patch just avoids recursion wherever possible and caches results a little more aggressively. Also avoids recomputing org/netbeans/modules/foo/ string from org.netbeans.modules.foo over and over.
Created attachment 8479 [details] Working patch - permits opt to be switched on or off
Numbers are more dramatic on S1SEE, presumably due to greater depth of dependencies: Average times: unoptimized 18.144784005483 std. dev. 0.0219925628913204 optimized 14.2167972564697 std. dev. 0.0371633602628928 Improvement: 3.92798674901327 Percentage: 21.6480215351492%
committed * Up-To-Date 1.8 core/bootstrap/src/org/netbeans/JarClassLoader.java committed * Up-To-Date 1.4 core/bootstrap/src/org/netbeans/ProxyClassLoader.java
verified