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

Summary: very expensive ItemConfiguration.getID(String) method
Product: cnd Reporter: Vladimir Voskresensky <vv159170>
Component: ProjectAssignee: Thomas Preisler <thp>
Status: CLOSED FIXED    
Severity: blocker Keywords: PERFORMANCE
Priority: P1    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

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.