Rev 14: Topologically sorting the keys shaves a bit of time when extracting fulltexts. in http://bazaar.launchpad.net/%7Ebzr/bzr-repodetails/trunk
John Arbash Meinel
john at arbash-meinel.com
Wed Dec 3 01:09:50 GMT 2008
At http://bazaar.launchpad.net/%7Ebzr/bzr-repodetails/trunk
------------------------------------------------------------
revno: 14
revision-id: john at arbash-meinel.com-20081203010639-h45n2ue3uq6l09dg
parent: john at arbash-meinel.com-20081203001101-3m9lxxe33fp41s2g
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: trunk
timestamp: Tue 2008-12-02 19:06:39 -0600
message:
Topologically sorting the keys shaves a bit of time when extracting fulltexts.
-------------- next part --------------
=== modified file 'gather_stats.py'
--- a/gather_stats.py 2008-12-03 00:11:01 +0000
+++ b/gather_stats.py 2008-12-03 01:06:39 +0000
@@ -22,7 +22,7 @@
import math
-from bzrlib import chk_map, repository, ui
+from bzrlib import chk_map, repository, ui, tsort
from bzrlib.inventory import CHKInventory
from bzrlib.repofmt.pack_repo import (
RepositoryFormatKnitPack1,
@@ -193,7 +193,10 @@
details = vf._index.get_build_details(keys)
for detail in details.itervalues():
objectstats.add_compressed_size(detail[0][2])
- keys = sorted(keys)
+ if vf._max_delta_chain:
+ keys = tsort.topo_sort(vf.get_parent_map(keys))
+ else:
+ keys = sorted(keys)
batch_size = 200
pb = ui.ui_factory.nested_progress_bar()
try:
More information about the bazaar-commits
mailing list