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 67027 - AutoCommentAction.enable() is expensive
Summary: AutoCommentAction.enable() is expensive
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Javadoc (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 65367
  Show dependency tree
 
Reported: 2005-10-18 09:57 UTC by Antonin Nebuzelsky
Modified: 2005-12-20 14:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
OptimizeIt screenshot (23.68 KB, image/png)
2005-10-18 09:59 UTC, Antonin Nebuzelsky
Details
proposed patch (2.52 KB, patch)
2005-10-19 10:53 UTC, Jan Pokorsky
Details | Diff
OptimizeIt screenshot (14.75 KB, image/png)
2005-10-20 10:44 UTC, Antonin Nebuzelsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonin Nebuzelsky 2005-10-18 09:57:30 UTC
See the attached snippet of OptimizeIt call stack (created when right-clicking
package node in explorer). Enabling of Auto Comment action is quite expensive
and does not scale well because it depends on the number of elements on
classpath. Any way to make it faster would make faster all popup menus which
have Auto Comment in Tools.
Comment 1 Antonin Nebuzelsky 2005-10-18 09:59:15 UTC
Created attachment 26065 [details]
OptimizeIt screenshot
Comment 2 Jan Pokorsky 2005-10-19 10:51:12 UTC
Here is the possible fix of this issue. It should improve speed in case a folder
is selected (the same case as you measured). Please let me know if it helped.
Comment 3 Jan Pokorsky 2005-10-19 10:53:32 UTC
Created attachment 26120 [details]
proposed patch
Comment 4 Antonin Nebuzelsky 2005-10-20 10:43:53 UTC
The patch really helps. See the attached OptimizeIt screenshot.
Comment 5 Antonin Nebuzelsky 2005-10-20 10:44:31 UTC
Created attachment 26159 [details]
OptimizeIt screenshot
Comment 6 Jan Pokorsky 2005-10-20 11:14:36 UTC
Thanks. Fixed in

/cvs/javadoc/src/org/netbeans/modules/javadoc/comments/AutoCommentAction.java,v
 <--  AutoCommentAction.java
new revision: 1.34; previous revision: 1.33
Comment 7 Antonin Nebuzelsky 2005-12-20 14:38:37 UTC
Marking as verified.