Community
Participate
Working Groups
I20090106-1323 SourceRefElementInfos have many unused fields. For example the 'children' field for methods is most of the time empty since most methods don't have children. We should create special subclasses that define these fields only when needed.
Created attachment 121811 [details] Proposed fix With this fix, after filling the Java model cache, the size of this cache is reduced by 4%.
Fix released for 3.5M5. To verify that the fix is in, one can: 1. Run a workspace with lots of compilation units on 3.5M4 2. Install the JDT Core Spy from http://www.eclipse.org/jdt/core/tools/jdtcoretools/update-site/ 3. Run JDT Core Spy > Fill Java Model Cache 4. Take a memory snapshot with YourKit 5. Follow step 1-4 with 3.5M5 6. Compare the snapshots
Verified for 3.5M5 using I20090125-2000 build As I don't have access to YourKit and since the link for JDT Core Spy appears broken right now, I eyeballed the changes to the layout of different classes to understand how fields have been "radiated out" to be away from the root of the hierarchy so as to minimize the memory requirement.