Rev 4745: We don't need to maintain the group caches indefinitely. in http://bazaar.launchpad.net/~jameinel/bzr/2.1-peak-mem-tweak

John Arbash Meinel john at arbash-meinel.com
Wed Oct 14 17:42:50 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/2.1-peak-mem-tweak

------------------------------------------------------------
revno: 4745
revision-id: john at arbash-meinel.com-20091014164242-pxsdaarfog6s22ka
parent: pqm at pqm.ubuntu.com-20091014075341-xjtgl5ji20autac6
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1-peak-mem-tweak
timestamp: Wed 2009-10-14 11:42:42 -0500
message:
  We don't need to maintain the group caches indefinitely.
  
  Probably we should abstract this and have a 'VF.clear_caches()' function?
-------------- next part --------------
=== modified file 'bzrlib/repofmt/groupcompress_repo.py'
--- a/bzrlib/repofmt/groupcompress_repo.py	2009-09-25 21:24:21 +0000
+++ b/bzrlib/repofmt/groupcompress_repo.py	2009-10-14 16:42:42 +0000
@@ -1105,7 +1105,9 @@
         for stream_info in self._fetch_revision_texts(revision_ids):
             yield stream_info
         self._revision_keys = [(rev_id,) for rev_id in revision_ids]
+        self.from_repository.revisions._group_cache.clear()
         yield self._get_inventory_stream(self._revision_keys)
+        self.from_repository.inventories._group_cache.clear()
         # TODO: The keys to exclude might be part of the search recipe
         # For now, exclude all parents that are at the edge of ancestry, for
         # which we have inventories
@@ -1114,7 +1116,9 @@
                         self._revision_keys)
         for stream_info in self._get_filtered_chk_streams(parent_keys):
             yield stream_info
+        self.from_repository.chk_bytes._group_cache.clear()
         yield self._get_text_stream()
+        self.from_repository.texts._group_cache.clear()
 
     def get_stream_for_missing_keys(self, missing_keys):
         # missing keys can only occur when we are byte copying and not



More information about the bazaar-commits mailing list