Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312964 - Allow PackIndex to GC under memory pressure
Summary: Allow PackIndex to GC under memory pressure
Status: NEW
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-14 15:10 EDT by Shawn Pearce CLA
Modified: 2012-05-05 16:52 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Pearce CLA 2010-05-14 15:10:22 EDT
When PackFile opens a PackIndex to scan it, the PackIndex sticks around forever.  This mirrors C Git behavior which does the same thing.  But in a server environment JGit may need to juggle thousands of pack indexes within a single JVM.  If a repository isn't accessed frequently, or even if its ancient history is infrequently accessed, some (or all) of its PackIndexes should be able to be discarded from memory and reloaded later on demand.

We might also want to tie these into a limited size cache, similar to what we already do with ByteWindow.