Rev 23: Drop the batch size for indexing down to 2500 based on user feedback. in http://people.ubuntu.com/~robertc/baz2.0/plugins/search/trunk
Robert Collins
robertc at robertcollins.net
Wed Jun 11 14:46:14 BST 2008
At http://people.ubuntu.com/~robertc/baz2.0/plugins/search/trunk
------------------------------------------------------------
revno: 23
revision-id: robertc at robertcollins.net-20080611134613-r91btjp60gizwlpt
parent: robertc at robertcollins.net-20080611121020-xoig9yvahbdg1gs8
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Wed 2008-06-11 23:46:13 +1000
message:
Drop the batch size for indexing down to 2500 based on user feedback.
modified:
index.py index.py-20080608055509-hnimeek7q8tctkqf-2
=== modified file 'index.py'
--- a/index.py 2008-06-11 12:10:20 +0000
+++ b/index.py 2008-06-11 13:46:13 +0000
@@ -221,9 +221,10 @@
graph = locked_branch.repository.get_graph()
parent_map = graph.get_parent_map(revisions_to_index)
order = topo_sort(parent_map)
- # Assume 5000 revisions is tolerable for indexing:
- for offset in range(len(order) / 5000 + 1):
- revision_group = order[offset * 5000:(offset + 1) * 5000]
+ # 5000 uses 1GB on a mysql tree.
+ group_size = 2500
+ for offset in range(len(order) / group_size + 1):
+ revision_group = order[offset * group_size:(offset + 1) * group_size]
builder = ComponentIndexBuilder()
# here: index texts
# here: index inventory/paths
More information about the bazaar-commits
mailing list