Rev 27: reload_index - teach it to use "enough" rather than all the data. in http://people.ubuntu.com/~robertc/baz2.0/plugins/index2/trunk

Robert Collins robertc at robertcollins.net
Fri Jul 4 07:10:31 BST 2008


At http://people.ubuntu.com/~robertc/baz2.0/plugins/index2/trunk

------------------------------------------------------------
revno: 27
revision-id: robertc at robertcollins.net-20080704061030-xled0wh4s6yeq4f1
parent: robertc at robertcollins.net-20080704045618-y6g86t0z3kujqc7d
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Fri 2008-07-04 16:10:30 +1000
message:
  reload_index - teach it to use "enough" rather than all the data.
modified:
  indexbench.py                  indexbench.py-20080702083855-5tju02y79rw7kkzh-1
=== modified file 'indexbench.py'
--- a/indexbench.py	2008-07-03 11:57:14 +0000
+++ b/indexbench.py	2008-07-04 06:10:30 +0000
@@ -181,7 +181,8 @@
     now = time.time()
     for name, index in iter_indices(names, target, factory):
         order = name_keys[name]
-        shuffle(order)
+        if reload_index: # for sanity, only look at 50 keys
+            order = order[:50]
         for key in order:
             index.iter_entries([key]).next()
             if reload_index:




More information about the bazaar-commits mailing list