Mercurial > hg
changeset 11754:6ccd130eab0e stable
revlog: drop cache after use to save memory footprint
If we reconstruct back to back large versions, we need to drop the cache first to avoid doubling memory usage.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 05 Aug 2010 16:17:17 -0500 |
parents | eb7b04657dae |
children | 7d2aaeea67ed |
files | mercurial/revlog.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlog.py Thu Aug 05 16:17:17 2010 -0500 +++ b/mercurial/revlog.py Thu Aug 05 16:17:17 2010 -0500 @@ -1029,6 +1029,9 @@ base = self._cache[1] text = self._cache[2] + # drop cache to save memory + self._cache = None + self._loadindex(base, rev + 1) self._chunkraw(base, rev) if text is None: