diff mercurial/revlog.py @ 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 a463e3c50212
children 05deba16c5d5
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: