Bug 129624 - AccessRuleSet#messageTemplates takes a lot of memory
Summary: AccessRuleSet#messageTemplates takes a lot of memory
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M6   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-27 13:55 EST by Markus Keller CLA
Modified: 2006-03-28 03:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2006-02-27 13:55:38 EST
I20060223-1656

After running for about a day, I made a memory snapshot of my development Eclipse (ZRH plugins in source, dependencies imported as binary).

I saw that the strings in AccessRuleSet#messageTemplates take about 3.4 MB together. I found e.g. 59 distinct instances of the same string
"The type {0} is not accessible due to restriction on required library org.eclipse.jface/org.eclipse.jface_3.2.0_I20060216-1600.jar", which together use 17KB.

Since these strings seem to occur in patterns, they should probably be interned or otherwise reused.
Comment 1 Philipe Mulet CLA 2006-02-27 16:46:35 EST
Indeed, these should be interned.
Comment 2 Jerome Lanneluc CLA 2006-03-01 09:10:06 EST
Changed ClasspathEntry#getMessageTemplates() and State#readRestriction(DataInputStream) to use JavaModelManager#intern(String)
Comment 3 Maxime Daniel CLA 2006-03-28 03:22:07 EST
Verified for 3.2M6 using build I20060327-0010.