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 116261 - low performance of version control pop up menu
Summary: low performance of version control pop up menu
Status: RESOLVED DUPLICATE of bug 169325
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@versioncontrol
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 108501
  Show dependency tree
 
Reported: 2007-09-21 08:48 UTC by Alexander Simon
Modified: 2009-07-29 07:22 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2007-09-21 08:48:35 UTC
Class org.netbeans.modules.versioning.ProjectMenuItem
shouldn't analyze file system before real action.
Try to select 400 projects and invoke popup menu on selection.
UI freeze about 30 seconds.
See stack trace:

"AWT-EventQueue-1" prio=10 tid=0x08616800 nid=0x29 runnable [0xac009000..0xac009a70]
   java.lang.Thread.State: RUNNABLE
        at java.io.UnixFileSystem.list(Native Method)
        at java.io.File.list(File.java:973)
        at java.io.File.listFiles(File.java:1051)
        at org.netbeans.modules.versioning.spi.VCSContext.exclusionRemoved(VCSContext.java:309)
        at org.netbeans.modules.versioning.spi.VCSContext.normalize(VCSContext.java:298)
        at org.netbeans.modules.versioning.spi.VCSContext.<init>(VCSContext.java:286)
        at org.netbeans.modules.versioning.spi.VCSContext.forNodes(VCSContext.java:126)
        - locked <0xf218ba08> (a java.lang.Class for org.netbeans.modules.versioning.spi.VCSContext)
        at org.netbeans.modules.versioning.ProjectMenuItem.getOwners(ProjectMenuItem.java:112)
        at org.netbeans.modules.versioning.ProjectMenuItem.createItems(ProjectMenuItem.java:57)
        at org.netbeans.modules.versioning.ProjectMenuItem.access$100(ProjectMenuItem.java:44)
        at org.netbeans.modules.versioning.ProjectMenuItem$DynamicDummyItem.getMenuPresenters(ProjectMenuItem.java:171)
        at org.netbeans.modules.openide.awt.DefaultAWTBridge.convertComponents(DefaultAWTBridge.java:83)
        at org.openide.util.Utilities.actionsToPopup(Utilities.java:2663)
        at org.openide.util.Utilities.actionsToPopup(Utilities.java:2732)
        at org.openide.explorer.view.TreeView.createPopup(TreeView.java:895)
        at org.openide.explorer.view.TreeView$PopupAdapter.showPopup(TreeView.java:1341)
        at org.openide.awt.MouseUtils$PopupMouseAdapter.maybePopup(MouseUtils.java:160)
        at org.openide.awt.MouseUtils$PopupMouseAdapter.mousePressed(MouseUtils.java:151)
        at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263)
        at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:262)
        at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:262)
        at java.awt.Component.processMouseEvent(Component.java:6035)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
        at java.awt.Component.processEvent(Component.java:5803)
        at java.awt.Container.processEvent(Container.java:2058)
        at java.awt.Component.dispatchEventImpl(Component.java:4410)
        at java.awt.Container.dispatchEventImpl(Container.java:2116)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3983)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
        at java.awt.Container.dispatchEventImpl(Container.java:2102)
        at java.awt.Window.dispatchEventImpl(Window.java:2429)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Comment 1 Maros Sandor 2007-09-21 09:43:57 UTC
This time seems acceptable for such number of projects. Without computing the context we would not even know what menu
items to display (even whether it is CVS, Subversion, etc.). I agree this is a bug but not that severe at all.
Comment 2 Vladimir Voskresensky 2007-09-21 10:16:57 UTC
Unfortunately it blocks P1 Task... So it should not be P4, but higher (at least P2)
SunStudio product is based on NB and SS users work on really big projects (Oracle for example), so creating during 1
minute a context menu by blocking EQ thread is really bug.
Version systems always scan disc for information about changed files, so they must cache info needed for their context
menu as well without doing such expensive (I/O) work in AWT thread
Comment 3 Maros Sandor 2007-09-21 10:37:19 UTC
Running actions on 400 selected projects does not seem as a good practice to me. IMHO far more faster and easier would
be to mount their parent folder into Favorites view and run versioning (and other) actions from there. Versioning of
course caches the context so that when you open project menu over and over again, the operation is significantly faster.
Comment 4 Alexander Simon 2007-09-21 10:50:17 UTC
It is an action "Close selected projects". It's an ordinary and frequently used action.
Comment 5 Vladimir Voskresensky 2007-10-17 16:15:15 UTC
btw, version menus are in submenu, why submenu items are validated when submenu is not expanded?
Comment 6 Vladimir Voskresensky 2007-11-21 11:26:52 UTC
Please, fix delaying expensive operations till CVS popup *sub-menu* is opened, not when main popup menu is created.
You can use approach like 
/shared/data/ccvs/repository/cnd/modelui/src/org/netbeans/modules/cnd/modelui/switcher/CodeAssistanceSubmenuAction.java
Comment 7 Ondrej Vrabec 2009-07-29 07:22:11 UTC

*** This issue has been marked as a duplicate of 169325 ***