Bug 182177

Summary: [performance] JavaCore.newLibraryEntry() has very high invocation count on startup
Product: [Eclipse Project] JDT Reporter: Michael Rennie <Michael_Rennie>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: darin.eclipse
Version: 3.3Keywords: performance
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Michael Rennie CLA 2007-04-12 13:07:43 EDT
Following investigation into bug 179685 we found that JavaCore.newLibraryEntry() has a very high invocation count during startup when considering EEs with access rules - see profiling screen shots on 179685.
Comment 1 Jerome Lanneluc CLA 2007-04-13 06:31:48 EDT
Michael, I'm not sure to understand what you expect from us. JDT/Debug is making all these invocations, isn't it ?
Comment 2 Michael Rennie CLA 2007-04-13 10:10:20 EDT
yes we are, we were thinking (hoping) that there would be some way that we could batch or cache already created entries to be reused. Although as each access rule participant can create custom rules per project this seems unlikely.
Comment 3 Michael Rennie CLA 2007-04-13 10:19:03 EDT
we'll take this one back, as it has to do with us not you guys :)
Comment 4 Michael Rennie CLA 2007-04-13 12:38:11 EDT
The way the current API stands there is nothing we can do about this. 
To cache entries we need a compound key something like 
(vminstall, rules, environmentid) -> classpath entries

which would be sufficient, but each query to an EE for its rules creates a new array of rules (as the rules are collected from all of the participnats at the time the request for the rules occurs), therefore we can not effectively compare the arrays of rules for equality (using == ) without incurring more work than is already done. 

There is no way to batch create libraries.

marking as WONTFIX, since realistically there is nothing we can do....