Rev 3904: If we don't repack file texts, we save ~10% (124MB vs 140MB) in http://bzr.arbash-meinel.com/branches/bzr/brisbane/split_pack

John Arbash Meinel john at arbash-meinel.com
Tue Mar 24 21:52:31 GMT 2009


At http://bzr.arbash-meinel.com/branches/bzr/brisbane/split_pack

------------------------------------------------------------
revno: 3904
revision-id: john at arbash-meinel.com-20090324215215-ceot294mf4q57qh8
parent: john at arbash-meinel.com-20090324201908-cs6j7m91avmr5iyu
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: split_pack
timestamp: Tue 2009-03-24 16:52:15 -0500
message:
  If we don't repack file texts, we save ~10% (124MB vs 140MB)
  but it costs us about 2s during 'bzr co'.
  Probably would effect some things like 'bzr diff' as well.
  Need to evaluate if the size increase is worth the space difference.
-------------- next part --------------
=== modified file 'bzrlib/repofmt/groupcompress_repo.py'
--- a/bzrlib/repofmt/groupcompress_repo.py	2009-03-24 20:19:08 +0000
+++ b/bzrlib/repofmt/groupcompress_repo.py	2009-03-24 21:52:15 +0000
@@ -170,7 +170,7 @@
 
     # This is a semi-arbitrary horizon used to pack new stuff together,
     # separate from 'really old' stuff.
-    _RECENT_HORIZON = 1000
+    _RECENT_HORIZON = 100
 
     def __init__(self, pack_collection, packs, suffix, revision_ids=None,
                  reload_func=None):
@@ -312,13 +312,9 @@
         del self._chk_id_roots
         # Grab the text keys that are referenced by recent commits, so we can
         # prioritize those as well
-        for stream in _get_referenced_stream(recent_roots, True):
+        for stream in _get_referenced_stream(recent_roots,
+                                            self._gather_text_refs):
             yield stream
-        self._recent_text_refs = self._text_refs
-        if self._gather_text_refs:
-            self._text_refs = set(self._text_refs)
-        else:
-            self._text_refs = None
         del recent_roots
         for stream in _get_referenced_stream(old_roots,
                                              self._gather_text_refs):



More information about the bazaar-commits mailing list