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 48719 - CloseProjects.actionPerformed slow for many projects
Summary: CloseProjects.actionPerformed slow for many projects
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 41535
  Show dependency tree
 
Reported: 2004-09-08 19:20 UTC by Jesse Glick
Modified: 2006-03-24 10:15 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 Jesse Glick 2004-09-08 19:20:50 UTC
Acc. to OptimizeIt, when closing a lot of projects
(20 or so), almost 9% of CPU is spent in
FileObject.getURL, almost all of which is from

CP.aP -> OPL.close -> OPL.saveProjectList ->
OPL.projects2URLs -> FO.gURL

Now this is quadratic time! Each project is closed
individually, and each time, the whole project
list is saved again, meaning each (remaining)
project has to have its URL checked.

Would be faster to just have a method
OPL.close(Project[]).
Comment 1 Petr Hrebejk 2004-09-09 15:00:24 UTC
Thanks for finding it. It is much fatster now.

Checking in
projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java;
/cvs/projects/projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java,v
 <--  OpenProjectList.java
new revision: 1.25; previous revision: 1.24
done
Processing log script arguments...
More commits to come...
Checking in
projectui/src/org/netbeans/modules/project/ui/actions/CloseProject.java;
/cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/CloseProject.java,v
 <--  CloseProject.java
new revision: 1.7; previous revision: 1.6
done
Comment 2 Marian Mirilovic 2005-12-20 15:50:27 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.