Bug 205678 - Don't read all JARs when finding covered packages with Netbinox
Don't read all JARs when finding covered packages with Netbinox
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Netigso
7.2
Other Linux
: P2 (vote)
: 7.2
Assigned To: Jaroslav Tulach
issues@platform
bugdb_13376802
: API_REVIEW_FAST, PLAN
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-29 21:03 UTC by Jaroslav Tulach
Modified: 2012-01-25 10:16 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
One approach is to read the content from the JAR file directly (7.40 KB, patch)
2011-12-15 08:54 UTC, Jaroslav Tulach
Details | Diff
NetigsoArchive.isActive (11.48 KB, patch)
2012-01-03 12:52 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo