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.

Bug 205678

Summary: Don't read all JARs when finding covered packages with Netbinox
Product: platform Reporter: Jaroslav Tulach <jtulach>
Component: NetigsoAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED FIXED    
Severity: normal CC: apireviews, cyhelsky
Priority: P2 Keywords: API_REVIEW_FAST, PLAN
Version: 7.2   
Hardware: Other   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: One approach is to read the content from the JAR file directly
NetigsoArchive.isActive

Description Jaroslav Tulach 2011-11-29 21:03:52 UTC
Looks like the code in Netigso.java:

Enumeration en = b.findEntries("", null, true);
while (en.hasMoreElements()) {
  URL url = (URL) en.nextElement();
}

reads content of all JARs. That does not seem to be very effective especially if the amount of bundles is low.
Comment 1 Jaroslav Tulach 2011-12-15 08:54:27 UTC
Created attachment 114210 [details]
One approach is to read the content from the JAR file directly

This prevents the OSGi framework to resolve the bundles (this is what findEntries is required to do). But it may not find all packages from fragments or external bundles.
Comment 2 Jaroslav Tulach 2012-01-03 12:52:21 UTC
Created attachment 114579 [details]
NetigsoArchive.isActive
Comment 3 Jaroslav Tulach 2012-01-09 10:48:00 UTC
No comments so far. I guess nobody cares and I'll integrate tomorrow.
Comment 4 Jaroslav Tulach 2012-01-10 11:15:07 UTC
Integrated as core-main#c3b7c6f096ef

This fix could/should improve first start without caches a bit, if anyone on NetBeans IDE side is interested.
Comment 5 Quality Engineering 2012-01-11 16:15:51 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/c3b7c6f096ef
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #205678: Disable archive on first start to prevent loading whole content of bundle JARs