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.
dev build from Dec 17, JDK5.0 Newly added nodes for Libraries and Test Libraries show elements from execution and testing classpath but expanding of these nodes is slow. This is especialy true for rt.jar node expanding. rt.jar contains a lot of entries that are grouped into packages view and then presented. Another case is expanding of package content. It possible that this is slow because we use differnt icon for classes that are supposed to be bean and another icon for the rest of classes (+ badges for executable classes).
Some numbers from my Dell notebook (P4 2GHz, 1GB, Linux FC2, JDK5.0u1-b06) first expand of rt.jar node 7.3s first expand of junit node 0.5s (OK) expanding of junit.framework package 2.2s expanding of java.awt package 17.5s expanding of java.beans package 5s first expand of rt.jar node in 2nd project 5.3s first expand of junit node in 2nd project 0.1s (OK) expanding of junit.framework package in 2nd project 0.5s expanding of java.awt package in 2nd project 0.5s It means that package opening is pretty slow and even when it is displayed there is still some activity running after first open that causes next repaints (event firing?)
re packages expanding: the time is spent in PackageViewChildren.run -> %75 computeKeys & %35 refreshKeys. - computeKeys iterates through all entries in JarFS. We check timestamp for each AFO created and schedule closing of jar file. 20% is also in VisiblityQuery.isVisible (regexp matching). I am adding Radek to cc, maybe he can suggest some improvements in JarFS. - refreshKeys - creating of nodes (finding DOs), galls to getCookie and lookup unpdating. Then we get back to AWT to display packages. Here we can perhaps save some time in getIcon - we do check if package is publicly accessible for every package. This involves FileOwerQuery execution and than check if there is AccessibilityQuery.
re package content expanding: ClassDataNode.<init> -> ClassDataNode.initialize -> ClassDataObject.getSource -> org.openide.src.SourceElement.<init> and the elements are eagerly initalized. This is really heavy task and forces full GC and couple of minor GCs. Icon resolving is really postponed at least on Solaris until the computation of nodes is done but probably it will be worse on Linux.
I am trying to delay the parsing of the classfile which slows down the folder expansion.
Checking in src/org/netbeans/modules/clazz/ClassDataNode.java; /cvs/clazz/src/org/netbeans/modules/clazz/ClassDataNode.java,v <-- ClassDataNode.java new revision: 1.47; previous revision: 1.46 done RCS file: /cvs/clazz/src/org/netbeans/modules/clazz/LazySourceChildren.java,v done Checking in src/org/netbeans/modules/clazz/LazySourceChildren.java; /cvs/clazz/src/org/netbeans/modules/clazz/LazySourceChildren.java,v <-- LazySourceChildren.java initial revision: 1.1 done