Rev 4: Setting the set_optimize flag had a huge impact on btree indexes. in http://bzr.arbash-meinel.com/plugins/per_file_graph
John Arbash Meinel
john at arbash-meinel.com
Thu Oct 29 15:48:24 GMT 2009
At http://bzr.arbash-meinel.com/plugins/per_file_graph
------------------------------------------------------------
revno: 4
revision-id: john at arbash-meinel.com-20091029154811-cnsasss0shnr6r3p
parent: john at arbash-meinel.com-20091029154207-ytmk9o5cc8z7k5c2
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: per_file_graph
timestamp: Thu 2009-10-29 10:48:11 -0500
message:
Setting the set_optimize flag had a huge impact on btree indexes.
-------------- next part --------------
=== modified file 'simple_btree.py'
--- a/simple_btree.py 2009-10-29 15:42:07 +0000
+++ b/simple_btree.py 2009-10-29 15:48:11 +0000
@@ -32,6 +32,9 @@
# spilled
btbuilder = btree_index.BTreeBuilder(reference_lists=1, key_elements=2,
spill_at=1*1000*1000)
+ # Note: in testing, setting this has a significant impact. Writing is
+ # measurably slower, but it shrinks the 4k page index from
+ # 4.7MB => 3.5MB.
btbuilder.set_optimize(for_size=True)
total = len(parent_map)
count = 0
More information about the bazaar-commits
mailing list