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 50021 - Iterating through LibraryProviders in ModuleInstall slows down startup
Summary: Iterating through LibraryProviders in ModuleInstall slows down startup
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 41535 49990
  Show dependency tree
 
Reported: 2004-10-06 14:55 UTC by _ rkubacki
Modified: 2006-03-24 10:25 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch to not validate (4.99 KB, patch)
2004-10-06 16:32 UTC, _ rkubacki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2004-10-06 14:55:14 UTC
org.netbeans.modules.project.libraries iterates
all library providers during IDE start. This takes
~550 ms of 35 seconds on my P4/2GHz/1GB machine.
Comment 1 _ rkubacki 2004-10-06 16:32:13 UTC
Created attachment 18096 [details]
patch to not validate
Comment 2 _ rkubacki 2004-10-06 16:41:57 UTC
If we do not validate we can save about 20%. Part is entity catalog
init and second is loading of DTD and validation. It seems that
EntityCatalog.getDefault is not taking time here so the time is
probably really saved.
Comment 3 Jesse Glick 2004-10-06 17:12:58 UTC
Patch looks good as far as behavior goes.

The comment "//the code was generated according DTD" [sic] doesn't
seem to be describing anything useful and could be removed.

Since the patch would mean that the "resolver" param to the
LibraryDeclarationParser would always be null anyway, the param should
be removed, as well as the field it initializes, and the tests for it
being non-null.

Also please just delete obsolete code rather than commenting it out -
makes the patch easier to read as well as the source code.
Comment 4 Tomas Zezula 2004-10-07 11:02:47 UTC
I've applied Radim's patch and fixed Jesse's comments.
Checking in
src/org/netbeans/modules/project/libraries/LibrariesStorage.java;
/cvs/projects/libraries/src/org/netbeans/modules/project/libraries/LibrariesStorage.java,v
 <--  LibrariesStorage.java
new revision: 1.14; previous revision: 1.13
done
Checking in
src/org/netbeans/modules/project/libraries/LibraryDeclarationParser.java;
/cvs/projects/libraries/src/org/netbeans/modules/project/libraries/LibraryDeclarationParser.java,v
 <--  LibraryDeclarationParser.java
new revision: 1.3; previous revision: 1.2
done
Comment 5 Marian Mirilovic 2005-12-20 15:52:32 UTC
This issue was solved long time ago. Because nobody has reopened it neither
added comments, we are verifying/closing it now. 
If you are still able to reproduce the problem, please reopen. Thanks in advance.