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 59550 - First invocation of File menu is too slow
Summary: First invocation of File menu is too slow
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: PERFORMANCE
: 61579 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-02 13:51 UTC by ehucka
Modified: 2005-12-10 23:53 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 ehucka 2005-06-02 13:51:48 UTC
When I invoke this File | Open Recent Project at first time after IDE start it
blocks AWT for about a minute. Next invocation are normal.
I think this menu is not invoked very often then it is quite unusable. Though it
shouldn't block AWT so long.

Threaddump segment:

"AWT-EventQueue-1" prio=1 tid=0x0847cac0 nid=0xeb1 runnable [0x5c3ff000..0x5c400580]
java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
java.io.File.isFile(File.java:747)
org.netbeans.modules.apisupport.project.ModuleList.parseData(ModuleList.java:412)
org.netbeans.modules.apisupport.project.ModuleList.scanPossibleProject(ModuleList.java:173)
org.netbeans.modules.apisupport.project.ModuleList.doScanNetBeansOrgSources(ModuleList.java:166)
org.netbeans.modules.apisupport.project.ModuleList.doScanNetBeansOrgSources(ModuleList.java:167)
org.netbeans.modules.apisupport.project.ModuleList.createModuleListFromNetBeansOrgSources(ModuleList.java:148)
org.netbeans.modules.apisupport.project.ModuleList.findOrCreateModuleListFromNetBeansOrgSources(ModuleList.java:138)
org.netbeans.modules.apisupport.project.ModuleList.getModuleList(ModuleList.java:102)
- locked <0x7d3091d0> (a java.lang.Class)
org.netbeans.modules.apisupport.project.NbModuleProject.getModuleList(NbModuleProject.java:662)
org.netbeans.modules.apisupport.project.NbModuleProject.<init>(NbModuleProject.java:100)
org.netbeans.modules.apisupport.project.NbModuleProjectType.createProject(NbModuleProjectType.java:41)
Comment 1 Jesse Glick 2005-06-02 16:06:22 UTC
I cannot reproduce any delay over a few seconds. It takes a little disk access
to load NBM projects. Are you using an especially slow drive perhaps (e.g. NFS
mounted sources)? Also if you already have open some NBM project (or had one
open in the same session) it should have already done this scanning before - do
you mean accessing the Recent Projects menu when you are *not* working on any
NBM projects?

May be possible to move some operations out of project load, so that after
calling the project's constructor only the display name and icon are available,
and everything else is loaded on demand later, which would make Recent Projects
faster (but not affect anything else). Not sure.
Comment 2 ehucka 2005-06-02 16:48:56 UTC
I don't have any nb project opened only a few applications and a web project.
But there are some nb projects in the recent projects list. I'm using only a
local disk for all projects.
Comment 3 ehucka 2005-09-13 14:44:31 UTC
Now it blocks awt thread after first invocation of File menu. 
I think loading of recent projects (minor and possible long io action) should
not block first invocation of File menu for seconds without any progress, status
message or wait cursor.
Comment 4 Milos Kleint 2005-10-18 14:52:04 UTC
I think the file menu blocking is gone now, was introduced by me when rewriting
the main menu codebase. The Recent Projects submenu is only populated when user
expands it.. still a P2?
Comment 5 Martin Krauskopf 2005-10-18 15:09:35 UTC
It seems to me that it is populated when you select, but not expand yet, the
"Open Recent Project" submenu. Could be populated when the menu is really
expanded (right arrow pressed). Can be actually noticed only when using purely
keyboard, not mouse (with mouse it is always immediatelly expanded when a mouse
hover over the submenu). But it is rather P5 or better, fixed IMHO (at least
according to what subject says).
Comment 6 Jesse Glick 2005-10-30 00:31:41 UTC
Can try to defer module list scanning in the evaluator until it is first needed
for a specific reason (e.g. classpath computation). So opening a module or
showing its list of subprojects will definitely have to scan the module list,
but e.g. passing over it in the Recent Projects menu should not.
Comment 7 Jesse Glick 2005-10-30 02:02:30 UTC
committed   * Up-To-Date  1.123      
apisupport/project/src/org/netbeans/modules/apisupport/project/NbModuleProject.java
committed   * Up-To-Date  1.13       
apisupport/project/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java
added       * Up-To-Date  1.1        
apisupport/project/test/unit/src/org/netbeans/modules/apisupport/project/AvoidModuleListInProjectConstructorTest.java
committed   * Up-To-Date  1.5        
apisupport/project/test/unit/src/org/netbeans/modules/apisupport/project/queries/JavadocForBinaryImplTest.java
committed   * Up-To-Date  1.5        
apisupport/project/test/unit/src/org/netbeans/modules/apisupport/project/queries/SourceForBinaryImplTest.java
committed   * Up-To-Date  1.6        
apisupport/project/test/unit/src/org/netbeans/modules/apisupport/project/queries/UpdateTrackingFileOwnerQueryTest.java
Comment 8 ehucka 2005-11-07 10:07:09 UTC
v
Comment 9 Jesse Glick 2005-12-10 23:53:42 UTC
*** Issue 61579 has been marked as a duplicate of this issue. ***