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 174115

Summary: org-netbeans-modules-ide-ergonomics.jar duplicates resources
Product: ide Reporter: Jan Lahoda <jlahoda>
Component: Features On DemandAssignee: issues@performance <issues>
Status: NEW ---    
Severity: blocker Keywords: PERFORMANCE
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Jan Lahoda 2009-10-08 16:13:01 UTC
File org-netbeans-modules-ide-ergonomics.jar contains duplicates of resources that appear in other jars in the full
distribution. E.g.:
org/netbeans/modules/ide/ergonomics/java/org-netbeans-libs-javacapi-javac-library.xml
is a pristine copy of:
org/netbeans/libs/javacapi/javac-library.xml from java?/modules/org-netbeans-libs-javacapi.jar

Please do not create duplicate resources.
Comment 1 Jaroslav Tulach 2009-10-08 17:32:44 UTC
Well, this is as designed. The ide-ergonomics.jar serves as a cache of resources available elsewhere, so their JARs do 
not need to be opened to load them.

Purpose of caches is to duplicate information, so I think that in this case the duplication is appropriate.
Comment 2 Jan Lahoda 2009-10-08 21:34:56 UTC
Cool. So these resources are actually three or four times on my disk: in the correct module jar, in ergonomics and in
the resources cache (possibly twice, once for the correct module jar and once for ergonomics). Interesting.

Anyway, seems that the cache may need to be fixed. Regarding javac-library.xml, I was able to find only two cases:
a) the cache is harmful: enabled C/C++, and the project libraries tried to load the library from ergonomics, but as j2se
libraries were not enabled, the library could not be created. So time and memory was wasted to parse a library from the
cache.
b) the cache is useless: created J2SE Project - (it seems that) the version of the javac library from the
org-netbeans-libs-javacapi.jar was used, cache was ignored.

Could you please provide me user-level instructions to see the cache in action?