Rev 4746: Partial fix for bug #566940. in http://bazaar.launchpad.net/~jameinel/bzr/2.0.6-peak-commit-mem
John Arbash Meinel
john at arbash-meinel.com
Mon Apr 19 22:43:53 BST 2010
At http://bazaar.launchpad.net/~jameinel/bzr/2.0.6-peak-commit-mem
------------------------------------------------------------
revno: 4746
revision-id: john at arbash-meinel.com-20100419214341-6tnj9pnzclsevbmc
parent: pqm at pqm.ubuntu.com-20100402135506-0tbjujqpqa0bxz7c
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.0.6-peak-commit-mem
timestamp: Mon 2010-04-19 16:43:41 -0500
message:
Partial fix for bug #566940.
Destroy the existing compressor object sooner. It holds on to
a copy of the block which references the uncompressed text
chunks. However we don't need either anymore. Just get rid
of it sooner.
We still seem to have 3x the compressed text size, but that
is better than 3x the compressed size +1x the original text
size.
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2010-04-01 14:10:47 +0000
+++ b/NEWS 2010-04-19 21:43:41 +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,8 @@
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 text copy. (John Arbash Meinel, #566940)
+
bzr 2.0.5
#########
=== 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