Rev 2771: (robertc) Use the default zlib compression level rather than -9 improving commit performance. (Robert Collins) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Aug 31 02:04:05 BST 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 2771
revision-id: pqm at pqm.ubuntu.com-20070831010401-nyz15lnphtkf3toz
parent: pqm at pqm.ubuntu.com-20070830171447-t9j1u709q4yw63lh
parent: robertc at robertcollins.net-20070831000457-uy77x0wf4zp8n04d
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2007-08-31 02:04:01 +0100
message:
  (robertc) Use the default zlib compression level rather than -9 improving commit performance. (Robert Collins)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/knit.py                 knit.py-20051212171256-f056ac8f0fbe1bd9
    ------------------------------------------------------------
    revno: 2762.3.2
    merged: robertc at robertcollins.net-20070831000457-uy77x0wf4zp8n04d
    parent: robertc at robertcollins.net-20070830233527-32eufgwtk781yn71
    parent: pqm at pqm.ubuntu.com-20070830171447-t9j1u709q4yw63lh
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: integration
    timestamp: Fri 2007-08-31 10:04:57 +1000
    message:
      Resolve conflicts in NEWS.
    ------------------------------------------------------------
    revno: 2762.3.1
    merged: robertc at robertcollins.net-20070830233527-32eufgwtk781yn71
    parent: pqm at pqm.ubuntu.com-20070828155202-pcq659o80mx4f4p3
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: knits
    timestamp: Fri 2007-08-31 09:35:27 +1000
    message:
      * The compression used within the bzr repository has changed from zlib
        level 9 to the zlib default level. This improves commit performance with
        only a small increase in space used (and in some cases a reduction in
        space). (Robert Collins)
=== modified file 'NEWS'
--- a/NEWS	2007-08-29 15:07:11 +0000
+++ b/NEWS	2007-08-31 00:04:57 +0000
@@ -92,6 +92,11 @@
     * Parameters passed on the command line are checked to ensure they are
       supported by the encoding in use. (Daniel Watkins)
 
+    * The compression used within the bzr repository has changed from zlib
+      level 9 to the zlib default level. This improves commit performance with
+      only a small increase in space used (and in some cases a reduction in
+      space). (Robert Collins)
+
   API BREAKS:
 
    * ``Branch.append_revision`` is removed altogether; please use 

=== modified file 'bzrlib/knit.py'
--- a/bzrlib/knit.py	2007-08-24 02:15:47 +0000
+++ b/bzrlib/knit.py	2007-08-30 23:35:27 +0000
@@ -68,6 +68,7 @@
 import os
 import sys
 import warnings
+from zlib import Z_DEFAULT_COMPRESSION
 
 import bzrlib
 from bzrlib.lazy_import import lazy_import
@@ -1880,7 +1881,8 @@
         :return: (len, a StringIO instance with the raw data ready to read.)
         """
         sio = StringIO()
-        data_file = GzipFile(None, mode='wb', fileobj=sio)
+        data_file = GzipFile(None, mode='wb', fileobj=sio,
+            compresslevel=Z_DEFAULT_COMPRESSION)
 
         assert isinstance(version_id, str)
         data_file.writelines(chain(




More information about the bazaar-commits mailing list