Bug 92367 - SourceElementParser performance
Summary: SourceElementParser performance
Status: RESOLVED DUPLICATE of bug 134255
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 RC1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2005-04-22 09:30 EDT by Martin Aeschlimann CLA
Modified: 2006-03-31 09:07 EST (History)
0 users

See Also:


Attachments
invocation times (260.42 KB, text/html)
2005-04-22 09:32 EDT, Martin Aeschlimann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2005-04-22 09:30:32 EDT
20050422

For an other bug I was looking at the open editor performance:
- copy OS.java from swt.win32 to a new project -> several compiler errors in file
- open this file in a Java editor with outline
 -> 1419 fields, 4 initializers and 780 methods

What is interesting is that mostly in JavaElementInfo.addChild
When adding a child a 'contains' test is performed that compares each child with
each one resulting in over 1'000'000 calls of equals.
If that 'contains' test really required here? Whouldn't the SourceElementParser
only return different children?
Comment 1 Martin Aeschlimann CLA 2005-04-22 09:32:35 EDT
Created attachment 20236 [details]
invocation times

contact me for full snapshot
Comment 2 Martin Aeschlimann CLA 2005-04-22 09:33:16 EDT
build is 20050420 + jdt.core/ui HEAD from 20050422
Comment 3 Jerome Lanneluc CLA 2006-03-28 11:35:58 EST
Will keep this optimization for post 3.2
Comment 4 Jerome Lanneluc CLA 2006-03-31 09:07:14 EST
Reopening as this appears to be a bottleneck in latest
Comment 5 Jerome Lanneluc CLA 2006-03-31 09:07:37 EST

*** This bug has been marked as a duplicate of 134255 ***