revlog: drop cache after use to save memory footprint stable
authorMatt Mackall <mpm@selenic.com>
Thu, 05 Aug 2010 16:17:17 -0500
branchstable
changeset 11754 6ccd130eab0e
parent 11753 eb7b04657dae
child 11755 7d2aaeea67ed
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.
mercurial/revlog.py
--- 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: