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 oct 25] This one method took 24.7% (!) of CPU time in my experiment while I was moving the node selection in the Explorer (with no VCS filesystems mounted, note). This time was spent in InstanceSupport.instanceClass. Note that since every Java source has an InstanceCookie, every time you select a node in the Explorer, a check is made to see if FindAction should be enabled, which because of VcsSearchType causes that Java source to be loaded from the current classloader. This is very time-consuming. Please rewrite this method; you might consider checking that the node does _not_ have DataObject as a cookie. Also please use InstanceCookie.Of.instanceOf(), this is what it is for (unfortunately it will not help on the InstanceSupport's that JavaDataObject uses, but it is critical on other nodes such as settings).
Fixed by check on DataObject cookie and usage of InstanceCookie.Of instead of InstanceCookie. Please verify whether the performance was improved.
I can check at some point, but the new code looks very weird. Surely if there is one node selected, Filesystems, its DataObject cookie will be null and the method will return false? I'm not sure I follow the logic. Ignore if I am just confused, but I think you meant: DataFolder folder = ...getCookie(DataFolder); if (folder != null) { // ... as now } else { // move this inside else-clause and reverse it: if (...getCookie(DataObject.class) != null) continue; InstanceCookie.Of ic = ...; // ... as now }
Oh yes, I didn't realize, that DataSystem does not have a DataObject cookie. Now it makes sense. The change done. Thanks for hints.
I did some quick timing tests today and saw no mention of vcscore. :-)
Resolved for 3.4.x or earlier, no new info since then -> closing.