Bug 65272 - Should use LRUCache for package fragments
Summary: Should use LRUCache for package fragments
Status: VERIFIED DUPLICATE of bug 57585
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-02 07:23 EDT by Jerome Lanneluc CLA
Modified: 2004-09-24 05:39 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 Jerome Lanneluc CLA 2004-06-02 07:23:30 EDT
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.
Comment 1 Jerome Lanneluc CLA 2004-06-02 07:29:34 EDT
Comparing the 2 memory snapshots, I see 20,000 ClassFile handles more using 
the HashMap than using the LRUCache.
Comment 2 Philipe Mulet CLA 2004-06-02 08:05:22 EDT
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.

Comment 3 Jerome Lanneluc CLA 2004-08-19 09:03:09 EDT

*** This bug has been marked as a duplicate of 57585 ***
Comment 4 Frederic Fusier CLA 2004-09-24 05:39:56 EDT
Verified for 3.1 M2 with build I200409231635.