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 44358 - [perf] Do not clutter Java repository with internal JDK classes
Summary: [perf] Do not clutter Java repository with internal JDK classes
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-06-04 18:35 UTC by _ rkubacki
Modified: 2007-09-26 09:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2004-06-04 18:35:13 UTC
Currently all classes from bootclasspath are
scanned and maintained in Java MDR. These classes
are then offered in code completion and at other
places (fast Java import) thought they are only
internal implementation. Users should not use them.

With correctly reduced scope of bootclasspath
analysis we can also get some performance benefit
due to smaller database.
Comment 1 Martin Matula 2004-06-04 18:54:10 UTC
The question is how to identify the classes that can be igonred:
- have a hard-coded hack for bootclasspath jars?
- make it configurable somehow?
Comment 2 _ rkubacki 2004-06-04 20:14:50 UTC
sun.* according to
http://java.sun.com/products/jdk/faq/faq-sun-packages.html

Of course there is a question whether it is OK for function like where
used to ignore these classes.
Comment 3 _ ttran 2004-06-05 23:58:02 UTC
hard coding may be good enough.  Definitely don't introduce an option.
 Nobody would find it.  I increase the priority to P2.  This may
improve the the initial creation of the repository significantly.

I have the feeling that the old code completion already did some trick
with this.  Mila may know
Comment 4 Miloslav Metelka 2004-06-07 08:49:35 UTC
Regarding parser DBs we in fact did not care about the contents of
bootclasspath. Instead we have pre-constructed DBs for JDK - they've
been built from contents of src.zip that does not contain sun.* sources.
There were other pre-built DBs as well - for classes that were
specific for certain modules functionality e.g. web module. There was
a specialized ant task to build these PDBs as part of the NB build
process.
Comment 5 Tomas Hurka 2004-06-22 08:41:32 UTC
Moved to new subcomponent java/javacore.
Comment 6 Martin Matula 2004-07-19 15:41:48 UTC
Lowering priority to P3 since this is a problem only for the first
start. It is not certain whether it is worth of implementing.
Performace team will measure a possible performance gain and together
we will evaluate whether we should give this a priority.
Comment 7 _ rkubacki 2004-07-20 10:09:29 UTC
There are 2971 entries in rt.jar starting with sun.* prefix (2116 if I
eliminate inner classes). Total number of entries is 13198. It means
22.5% are classes that are not important for us. Other jars in jre/lib
and jre/lib/ext will not change this ratio significantly as they are
much smaller. They will only slightly improve it.
Comment 8 Martin Matula 2004-07-22 12:28:05 UTC
Fixed.

Checking in src/org/netbeans/modules/javacore/scanning/FileScanner.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/scanning/FileScanner.java,v
 <--  FileScanner.java
new revision: 1.4; previous revision: 1.3
done

Packages to be ignored by scanning are read from
org.netbeans.javacore.ignoredPackages system property. The default
value is "sun sunw".
Comment 9 Antonin Nebuzelsky 2004-07-22 17:19:57 UTC
The time for the initial scanning decreased roughly by ~15-20%:

jdk 1.4.2_04 - 1:26 versus 1:44
jdk 1.5.0-b58- 1:58 versus 2:15

The memory consumption, as shown by the memory meter after the initial
scan, is not different (but as indicated by Petr Nejedly in issue
43258, part of the strings were shifted to perm. generation, which is
not covered by memory meter).
Comment 10 Antonin Nebuzelsky 2004-07-26 13:10:12 UTC
Marking as verified.
Comment 11 Quality Engineering 2007-09-20 09:51:12 UTC
Reorganization of java component