Rev 4747: (lifeless) Reduce peak memory usage by 1 compressed text copy when compressing in 2a foramts. (John A Meinel) in file:///home/pqm/archives/thelove/bzr/2.0/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Apr 29 03:02:50 BST 2010


At file:///home/pqm/archives/thelove/bzr/2.0/

------------------------------------------------------------
revno: 4747 [merge]
revision-id: pqm at pqm.ubuntu.com-20100429020246-4xdhhxug19t07z2d
parent: pqm at pqm.ubuntu.com-20100429004222-7l54pqjnaeer9gyr
parent: john at arbash-meinel.com-20100419220859-1d0eqz225pf9tgz0
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: 2.0
timestamp: Thu 2010-04-29 03:02:46 +0100
message:
  (lifeless) Reduce peak memory usage by 1 compressed text copy when compressing in 2a foramts. (John A Meinel)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/groupcompress.py        groupcompress.py-20080705181503-ccbxd6xuy1bdnrpu-8
=== modified file 'NEWS'
--- a/NEWS	2010-04-28 20:58:47 +0000
+++ b/NEWS	2010-04-29 02:02:46 +0000
@@ -14,6 +14,10 @@
 Bug Fixes
 *********
 
+* Additional merges after an unrelated branch has been merged with its
+  history no longer crash when deleted files are involved.
+  (Vincent Ladeuil, John Arbash Meinel, #375898)
+
 * ``bzr revert`` now only takes write lock on working tree, instead of on 
   both working tree and branch.
   (Danny van Heumen, #498409)
@@ -22,9 +26,9 @@
   permissions as ``.bzr`` directory on a POSIX OS.
   (Parth Malwankar, #262450)
 
-* Additional merges after an unrelated branch has been merged with its
-  history no longer crash when deleted files are involved.
-  (Vincent Ladeuil, John Arbash Meinel, #375898)
+* Reduce peak memory by one copy of compressed text.
+  (John Arbash Meinel, #566940)
+
 
 * Selftest with versions of subunit that support ``stopTestRun`` will no longer
   error. This error was caused by 2.0 not being updated when upstream

=== modified file 'bzrlib/groupcompress.py'
--- a/bzrlib/groupcompress.py	2009-09-08 06:25:26 +0000
+++ b/bzrlib/groupcompress.py	2010-04-19 21:43:41 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008, 2009 Canonical Ltd
+# Copyright (C) 2008, 2009, 2010 Canonical Ltd
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -1641,6 +1641,7 @@
         keys_to_add = []
         def flush():
             bytes = self._compressor.flush().to_bytes()
+            self._compressor = GroupCompressor()
             index, start, length = self._access.add_raw_records(
                 [(None, len(bytes))], bytes)[0]
             nodes = []
@@ -1649,7 +1650,6 @@
             self._index.add_records(nodes, random_id=random_id)
             self._unadded_refs = {}
             del keys_to_add[:]
-            self._compressor = GroupCompressor()
 
         last_prefix = None
         max_fulltext_len = 0




More information about the bazaar-commits mailing list