Community
Participate
Working Groups
I20040529 In the following scenario: 1. New workspace on top of JDK 1.4.2_04 2. Check out v_436 of - org.eclipse.jdt.core, - org.eclipse.jdt.core.tests, - org.eclipse.jdt.core.tests.builder, - org.eclipse.jdt.core.tests.compiler, - org.eclipse.jdt.core.tests.model, and v20040527_1600 of - org.eclipse.jdt.ui.tests - org.eclipse.jdt.ui.tests.refactoring 3. Search->Search->Java Search 4. Search string: add 5. Method, References 6. Press Search 7. Capture memory. With I20040529, retained memory is 29MB. The package cache containes 1400 entries. Changing JavaModelCache#pkgCache to be an OverflowingLRUCache with 500 entries, the retained memory is 25.6MB.
Comparing the 2 memory snapshots, I see 20,000 ClassFile handles more using the HashMap than using the LRUCache.
Post 3.0, as quite risky at this stage. In particular, we may instead consider closing entire package fragment roots instead of losing some of their packages gradually. Thus when space is claimed, an entire jar is closed instead of portions of multiple ones.
*** This bug has been marked as a duplicate of 57585 ***
Verified for 3.1 M2 with build I200409231635.