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.
The IndexOverviewAction's presenter does heavy computations in its addNotify which causes slowing the 'View' menu popup significantly. The computations are in the realms of: Searching all Javadoc capable FSes for some files, reading files, parsing HTML files, all of this in AWT thread during popup menu invocation.
Do you have any suggestions for collecting the documentation set names ?
Version: 4.0 dev -> S1S 4.2
I'd say the feature of displaying documentation set names by parsing files is too costly to be in popup menu. On the other hand, you can cache the title somewhere, like as an attribute on the root of the JavaDoc capable FS.
Probably this would be easier to solve if Actions.SubMenu and .SubMenuModel behaved a bit more simply w.r.t. when the submenu items are computed. IOA could simply assume that there are always some index items to display; if there were some call made to the model such as addNotify (currently you have to use addNotify on the menu presenter, I think) then it could compute the list at that time. Two changes in behavior would need to be made: (1) if there is only one menu item, it should still display a submenu (which IMHO may be desirable anyway but my request for this got closed WONTFIX long ago); (2) if there are none at all, it should display a greyed-out "(none)" item or similar. Re. change #1, this should probably be optional, since e.g. PasteAction should display as a simple menu item when there is only one PasteType, but for many actions it would be better to show a submenu with one item I think. Of course it would be possible to give up on using Actions.SubMenu (as I am often tempted to do anyway) and just write the submenu presenter manually. However there is should be an easy partial fix which may be enough: remove the displayNames list, and move the title parsing logic into getLabel. addNotify on the menu (e.g. post View menu) will still search for available index files and show a submenu, single menu item, or no menu item as appropriate, but it will not do any title parsing unless you actually post the submenu. Is this enough? Hopefully going through doc filesystems and checking for index.html is not significant overhead.
Done in trunk, /cvs/javadoc/src/org/netbeans/modules/javadoc/JavadocModule.java,v <-- JavadocModule.java new revision: 1.57; previous revision: 1.56 /cvs/javadoc/src/org/netbeans/modules/javadoc/search/IndexBuilder.java,v done Checking in src/org/netbeans/modules/javadoc/search/IndexBuilder.java; /cvs/javadoc/src/org/netbeans/modules/javadoc/search/IndexBuilder.java,v <-- IndexBuilder.java initial revision: 1.1 done Checking in src/org/netbeans/modules/javadoc/search/IndexOverviewAction.java; /cvs/javadoc/src/org/netbeans/modules/javadoc/search/IndexOverviewAction.java,v <-- IndexOverviewAction.java new revision: 1.4; previous revision: 1.3 done
OK.