Bug 87762 - [model] suspicious huge amount of IPackageFragmentRoot[]
Summary: [model] suspicious huge amount of IPackageFragmentRoot[]
Status: VERIFIED FIXED
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.1 M6   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2005-03-11 08:09 EST by Philipe Mulet CLA
Modified: 2005-04-12 05:47 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2005-03-11 08:09:22 EST
Build 20050308

Using some memory spy tool, when self-hosting using all plug-ins as projects, it
appears there are over 33.000 instances of IPackageFragmentRoot[] allocated to
represent a model made of 87 projects.

Early investigation shows:
- does not seem to be a leak
- results from internal caching from package fragment names -> roots.

Most of the instances are arrays of size 1, and could be optimized out by simply
pointing at it directly in cache, instead of using an array of 1 element.
Comment 1 Jerome Lanneluc CLA 2005-03-17 04:04:23 EST
Changed NameLookup#packageFragments to store the IPacckageFragmentRoot itself
when this is the only possible root for a given package.
Comment 2 Tod Creasey CLA 2005-03-31 11:04:02 EST
Jerome can you give me an idea of the improvments in performance so that I can
update the status page please?
Comment 3 Jerome Lanneluc CLA 2005-03-31 11:14:27 EST
What kind of info do you need ? Which status page ?
Comment 4 David Audel CLA 2005-03-31 12:05:20 EST
Verified in I20050330-0500
Comment 5 Tod Creasey CLA 2005-04-11 09:47:35 EDT
The performance status page.
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-core-home/documents/3.1/performance/fixed.html

We need something that people scanning our bugs can see the updates on.
Comment 6 Jerome Lanneluc CLA 2005-04-12 05:47:27 EDT
An array of size 1 is 20 bytes. We saved about 33 000 instances of
IPackageFragmentRoot[]s. So we gain 660 000 bytes (that's 640KB).