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 97853 - very expensive ItemConfiguration.getID(String) method
Summary: very expensive ItemConfiguration.getID(String) method
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: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2007-03-14 16:05 UTC by Vladimir Voskresensky
Modified: 2007-12-13 14:55 UTC (History)
0 users

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 Vladimir Voskresensky 2007-03-14 16:05:41 UTC
Please, have a look at following results
file:////net/endif.russia.sun.com/export/home1/deimos/dev/spb/vv159170/Profiling/IDE/ProjectSystem/ItemConfiguration-getItem.html

It shows, that we spent 79sec during opening project in the method, that does
the following:
return "item-" + path;
we must prevent such expensive operations of string creations.
Is it really necessary to have "item-" prefix? why path is not enough to be id
of Item?
Comment 1 Vladimir Voskresensky 2007-03-19 14:40:20 UTC
I implemented caching of ID. That gave us 2-3 factor in speed for
getAllSourceFiles
getAllHeaderFiles
of NativeProject

but the question remains. Do we need "item-" prefix at all?
Comment 2 Thomas Preisler 2007-03-19 16:54:18 UTC
Maybe not, but I have to be sure before removing it. Other 'things' than items
go in the same bag and I have to make sure that thay can all be uniquely
identified. Folders are another example. But folder names and item names don't
clash so I don't think there is a risk of mixing things up here. I just have to
be sure before removing the prefix. Pls leave the iz open and I will get to it
before fcs. 
Comment 3 Thomas Preisler 2007-03-22 21:13:34 UTC
Fixed the most grave performance issues. id string is now cached and it has
improved performance. Still room for more performance gains so want to keep this
IZ open....
Comment 4 Thomas Preisler 2007-04-12 19:12:51 UTC
Alexander fixed the performance issue with configuration.getAuxObject(getId())
so I consider this issue fixed.