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 61579 - Main window does not repaint for several minutes after startup
Summary: Main window does not repaint for several minutes after startup
Status: RESOLVED DUPLICATE of bug 59550
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: PERFORMANCE
: 61737 65004 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-01 02:40 UTC by _ tboudreau
Modified: 2005-12-10 23:53 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dump (16.24 KB, text/plain)
2005-08-01 02:41 UTC, _ tboudreau
Details
A couple optimizations that might marginally help (960 bytes, patch)
2005-08-01 20:33 UTC, _ tboudreau
Details | Diff
What all it's parsing on startup (42.63 KB, application/x-compressed)
2005-08-01 20:35 UTC, _ tboudreau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2005-08-01 02:40:34 UTC
Starting on an existing userdir;  it has been used over two different checkouts
on my disk.  Currently there is no open module project;  in the preceding
session I closed all open projects, opened openide in the fresh checkout I'm
going to use for the tutorial on tuesday, closed it, opened contrib/hexedit and
shut down.

On restart, the main window did not repaint for about 3 minutes after first
being shown.  Filing against apisupport based on what the AWT thread is doing in
the attached thread dump.
Comment 1 _ tboudreau 2005-08-01 02:41:06 UTC
Created attachment 23383 [details]
thread dump
Comment 2 Jesse Glick 2005-08-01 19:41:20 UTC
Not much I can do about it now - your Recent Projects list contains some
netbeans.org projects, and they are slow to load because they need to scan for
available modules, and your disk is probably slow - but will think about it.
Comment 3 _ tboudreau 2005-08-01 20:33:06 UTC
Created attachment 23408 [details]
A couple optimizations that might marginally help
Comment 4 _ tboudreau 2005-08-01 20:35:16 UTC
Created attachment 23409 [details]
What all it's parsing on startup
Comment 5 Jesse Glick 2005-08-02 20:31:21 UTC
I can apply a patch similar to yours (with some changes). Maybe it will help
somewhat.

What would make a difference is to parse every project.xml in the ModuleList
pass using SAX rather than DOM, but that would require a fair amount of work.
Comment 6 _ tboudreau 2005-08-02 20:44:27 UTC
If it can parse *that* many files at some random time, possibly blocking EQ, 
sounds like you'll need to do that eventually.  Perhaps some progress bar 
usage, though best would just be to make it fast enough that it's not needed.

FWIW, I actually tried out the XML module's action to generate a SAX parser 
from a DTD.  Not too bad.  
Comment 7 Jesse Glick 2005-08-02 21:20:29 UTC
The basic problem is that currently ModuleList scanning has to be done as part
of a project's constructor; at a minimum, it has to be done by the time a
project is opened, because the list is critical info in constructing the
classpath, which has to be known when the project is opened so that the global
classpath registry (used for refactoring etc.) gets updated correctly. And some
kinds of code currently block EQ loading projects.

We could try opening old projects on IDE restart asynch w/ a progress bar. Would
help appearance without really changing anything.

FWIW I can't reproduce any delays close to 3 minutes; I guess your machine is
slow. Not sure exactly which aspect of it, but probably Java -> filesystem access.
Comment 8 Jesse Glick 2005-08-03 01:05:07 UTC
committed     Up-To-Date  1.10       
apisupport/project/src/org/netbeans/modules/apisupport/project/universe/ModuleList.java
Comment 9 Jesse Glick 2005-08-03 16:56:59 UTC
*** Issue 61737 has been marked as a duplicate of this issue. ***
Comment 10 Jesse Glick 2005-09-23 17:20:18 UTC
*** Issue 65004 has been marked as a duplicate of this issue. ***
Comment 11 Jesse Glick 2005-12-10 23:53:43 UTC
Issue #59550 fixes should have solved this, I guess.

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