Rev 3919: A bit of testing showed that _FAST=True was actually *slower*. in http://bzr.arbash-meinel.com/branches/bzr/brisbane/disk_format

John Arbash Meinel john at arbash-meinel.com
Fri Mar 27 17:18:51 GMT 2009


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

------------------------------------------------------------
revno: 3919
revision-id: john at arbash-meinel.com-20090327171836-8d9g7lpah8d93olc
parent: john at arbash-meinel.com-20090327165644-xno4eq1vvq6n2otz
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: disk_format
timestamp: Fri 2009-03-27 12:18:36 -0500
message:
  A bit of testing showed that _FAST=True was actually *slower*.
  
  Now that the delta index has gaps for growth, adding a delta source costs
  us very little. And seems to not affect make_delta time. And the improved
  deltas save time spent in zlib.
-------------- next part --------------
=== modified file 'bzrlib/groupcompress.py'
--- a/bzrlib/groupcompress.py	2009-03-27 16:56:44 +0000
+++ b/bzrlib/groupcompress.py	2009-03-27 17:18:36 +0000
@@ -56,7 +56,6 @@
     )
 
 _USE_LZMA = False and (pylzma is not None)
-_FAST = False
 
 # osutils.sha_string('')
 _null_sha1 = 'da39a3ee5e6b4b0d3255bfef95601890afd80709'
@@ -735,10 +734,7 @@
             len_mini_header = 1 + len(enc_length)
             length = len(delta) + len_mini_header
             new_chunks = ['d', enc_length, delta]
-            if _FAST:
-                self._delta_index._source_offset += length
-            else:
-                self._delta_index.add_delta_source(delta, len_mini_header)
+            self._delta_index.add_delta_source(delta, len_mini_header)
         self._block.add_entry(key, type=type, sha1=sha1,
                               start=self.endpoint, length=length)
         start = self.endpoint



More information about the bazaar-commits mailing list