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 109232 - projectDescriptorProvider.getConfigurationDescriptor() in ProjectOpenedHookImpl.projectOpened thread significantly slows down IDE startup time
Summary: projectDescriptorProvider.getConfigurationDescriptor() in ProjectOpenedHookIm...
Status: CLOSED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Thomas Preisler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-10 13:05 UTC by _ nzero2002
Modified: 2007-11-23 10:46 UTC (History)
1 user (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 _ nzero2002 2007-07-10 13:05:56 UTC
The verification of the compilers setting is done in open huck threads, which slows down IDE startup time in case of
open projects. For MySQL the impact is about 23 seconds, which is very big, so I set P1 priority for this defect.

The solution would be to post a new task of verification, which will be executed in another thread and will not block
IDE startup.
Comment 1 _ gordonp 2007-07-10 18:01:53 UTC
What makes you think the compiler validation is taking 23 seconds? That sounds awfully extreme!

Also, doing this in a thread does not sound safe. The NB project module (not ours) was written
with the assumption that a project was 100% opened after the project open call returned. We already
break this rule and IMHO thats where most of the NPEs fixed late in 5.5.1 came from. Moving more
stuff onto separate threads is likely to cause more problems of this type. A much more reliable
approach to this problem would be to find a way to defer compiler validation. Currently the cnd
project system doesn't allow this.
Comment 2 Vladimir Voskresensky 2007-07-10 18:29:41 UTC
As I see, the hotspot is not the compiler validation phase in this method, but the 
projectDescriptor = projectDescriptorProvider.getConfigurationDescriptor();
which cause reading full configuration.xml (about 3Mb for mysql) and initializing all internal data structures

may be it's possible to postpone this expensive reading?
Comment 3 Vladimir Voskresensky 2007-07-10 18:30:59 UTC
I'm renaming issue to point to hotspot
Comment 4 _ gordonp 2007-07-10 19:50:15 UTC
I also think reading configuration.xml is the problem. Even worse, its read before you even open the
project. Open the Open Project chooser and single-click-to select any makeproject. This selection
reads configuration.xml. If you use keyboard navigation over multiple projects, especially large
projects, you're reading each configuration.xml file. Even if you don't open the project!
Comment 5 Vladimir Voskresensky 2007-07-11 04:37:17 UTC
I agree with the note, btw, this is the topic of http://www.netbeans.org/issues/show_bug.cgi?id=98081
Comment 6 Thomas Preisler 2007-07-26 04:30:16 UTC
Fixed. See http://www.netbeans.org/issues/show_bug.cgi?id=98081 for details.