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 169480

Summary: 3531 ms - JavaRefactoring isEnabled() check too slow
Product: java Reporter: Oleg Khokhlov <ovk>
Component: RefactoringAssignee: Jan Pokorsky <jpokorsky>
Status: RESOLVED FIXED    
Severity: blocker CC: aongun, jglick
Priority: P3 Keywords: PERFORMANCE
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=154493
Issue Type: DEFECT Exception Reporter: 154493
Attachments: nps snapshot

Description Oleg Khokhlov 2009-07-29 15:53:51 UTC
Build: NetBeans IDE Dev (Build 200907290201)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b02
OS: Windows XP, 5.1, x86

User Comments:
ovk: right click on method in java editor


Maximum slowness yet reported was 3531 ms, average is 3531
Comment 1 Oleg Khokhlov 2009-07-29 15:54:02 UTC
Created attachment 85477 [details]
nps snapshot
Comment 2 Jesse Glick 2009-07-29 17:11:59 UTC
JavaRefactoringGlobalAction should probably not be doing exotic enablement checks on EQ.

If an exact containment check is necessary, then probably WONTFIX: SourceGroup.contains will be slow the very first time
it is invoked on a group with a nontrivial includes list (or for the first time after changing the includes list), since
e.g. includes="**/api/" means that a check for "org/netbeans/" must be true iff some package like
org.netbeans.something.api exists. (In this case a *.java file is being queried, for which the knownIncludes list is not
needed, but sooner or later the same computation would have been needed anyway.)
Comment 3 Jan Pokorsky 2009-11-11 08:04:18 UTC
Popup menu action providers are now initialized by JavaEditorWarmUpTask now.

The SourceGroup query is used as a work around until someone fix bug 143542.