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 48598 - wrong usage of Filesystems API in Classpath significantly slows down some operations
Summary: wrong usage of Filesystems API in Classpath significantly slows down some ope...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Classpath (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: David Konecny
URL:
Keywords: PERFORMANCE
: 46414 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-07 15:19 UTC by David Konecny
Modified: 2004-09-14 14:55 UTC (History)
5 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 David Konecny 2004-09-07 15:19:05 UTC
Classpath.RootsListener.getFileSystems() method
has to be changed to cache results. If is called
#1) very often and #2) is quite expensive
especially on Windows.

Some measurement on my Dell notebook, WinXP.

1.) Opened 15 empty Java Application projects,
wait till they are parsed, restart IDE. After
restart the initial opening of MDR caches takes on
average 24 seconds. With caching of
C.RL.getFileSystems()it is only 9 seconds!

2.) Similar as above, but 30 NB projects.
Improvement is from 38 seconds to 15 seconds.

3.) Improvement is visible even on single Java
Application project opened in IDE. From about 7
seconds to 4.
Comment 1 David Konecny 2004-09-07 17:56:24 UTC
Fixed in:
ant/src-bridge/org/apache/tools/ant/module/bridge/impl/BridgeImpl.java;
new revision: 1.22; previous revision: 1.21
java/api/src/org/netbeans/api/java/classpath/ClassPath.java;
new revision: 1.26; previous revision: 1.25
java/javacore/src/org/netbeans/modules/javacore/Util.java;
new revision: 1.7; previous revision: 1.6
core/src/org/netbeans/core/actions/RefreshAllFilesystemsAction.java;
new revision: 1.6; previous revision: 1.5
core/ui/src/org/netbeans/core/ui/MenuWarmUpTask.java;
new revision: 1.10; previous revision: 1.9
Comment 2 David Konecny 2004-09-07 18:51:57 UTC
While fixing this I saw excessive firing of events from Classpath.
Depends on how many opened projects you have, a change in a classpath
of one project can result in hundreds of PropertyChangeEvents. I filed
that as issue 48611.
Comment 3 Tomas Hurka 2004-09-14 14:55:42 UTC
*** Issue 46414 has been marked as a duplicate of this issue. ***