Rev 3911: We can use 'random_id=True' when copying the streams. in http://bzr.arbash-meinel.com/branches/bzr/brisbane/lazy_gc_stream
John Arbash Meinel
john at arbash-meinel.com
Thu Mar 19 20:32:06 GMT 2009
At http://bzr.arbash-meinel.com/branches/bzr/brisbane/lazy_gc_stream
------------------------------------------------------------
revno: 3911
revision-id: john at arbash-meinel.com-20090319203157-h1b6rtdqm3wjjgli
parent: john at arbash-meinel.com-20090319030602-stjxub1g3yhq0u32
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: lazy_gc_stream
timestamp: Thu 2009-03-19 15:31:57 -0500
message:
We can use 'random_id=True' when copying the streams.
This is because the 'get_stream' code is responsible for ensuring
the keys are truly non-overlapping, and we know we are creating a
new pack file.
It might mean that we have some overlap with yet-another existing
pack file, but only if some other operation inserted it accidentally,
and that doesn't hurt anything. When we autopack or fetch, we will
skip one of those records anyway.
This saves quite a bit of time, since we don't have to look up
texts in the index we are writing. Mostly only in the case of
large projects where we have spilled some of the nodes to disk
already.
-------------- next part --------------
=== modified file 'bzrlib/repofmt/groupcompress_repo.py'
--- a/bzrlib/repofmt/groupcompress_repo.py 2009-03-17 20:33:54 +0000
+++ b/bzrlib/repofmt/groupcompress_repo.py 2009-03-19 20:31:57 +0000
@@ -382,6 +382,7 @@
try:
stream = vf_to_stream(source_vf, keys, message, child_pb)
for _ in target_vf._insert_record_stream(stream,
+ random_id=True,
reuse_blocks=False):
pass
finally:
@@ -415,6 +416,7 @@
for stream in self._get_chk_streams(source_vf, total_keys,
pb=child_pb):
for _ in target_vf._insert_record_stream(stream,
+ random_id=True,
reuse_blocks=False):
pass
finally:
More information about the bazaar-commits
mailing list