Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] Optimizing EGit's HistoryView

We currently analyse possible improvements of the HistoryView. We found three possible areas of improvement which could significantly reduce memory consumption and improve response time.

We use a large repo containing 184030 commits, 138 branches and 45 tags
The total heap size of eclipse with the history loaded is 342,2 MB. Without loading a history it is 138,2 MB

1. Load commits in batches (https://git.eclipse.org/r/#/c/5654/)
With this change only 256 TableItems are loaded initially. This reduces the memory consumption to 274.1 MB. The main effect is faster loading. But it does not save as much memory as we expected, because the RevWalk with RevSort.TOPO still loads all 184030 commits. The main reduction comes from 60000 less PlotLane arrays which saves about 60 MB.

Memory consumption of history shrinks from 200 MB to 136 MB

This led us to the next idea:

2. Additionally switch off RevSort.TOPO
Now the total heap size is 150 MB

Memory consumption of history shrinks again from 136 MB to 12 MB

3. Lazy loading of commit body
This can be done by revWalk.setRetainBody(false) and calling revWalk.parseBody for commits to be displayed. This reduces the memory consumption per non-displayed, but loaded commit by roughly 50 %.

The main effect would result from 1 + 2. What would be the consequence of not doing RevSort.TOPO? Would it otherwise be possible to do the sorting incrementally, i.e. sorting only the commits which are loaded? Or can everything be sorted but without keeping all the traversed commits in memory?


Back to the top