Rev 12: Read leaf nodes in one go without caching. in http://bzr.arbash-meinel.com/plugins/index2
John Arbash Meinel
john at arbash-meinel.com
Wed Jul 2 07:00:30 BST 2008
At http://bzr.arbash-meinel.com/plugins/index2
------------------------------------------------------------
revno: 12
revision-id: john at arbash-meinel.com-20080702055951-2aadto8k1552yvd5
parent: john at arbash-meinel.com-20080702054002-tripfvw7uca0jyn2
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: index2
timestamp: Wed 2008-07-02 00:59:51 -0500
message:
Read leaf nodes in one go without caching.
-------------- next part --------------
=== modified file 'btree_index.py'
--- a/btree_index.py 2008-07-02 05:40:02 +0000
+++ b/btree_index.py 2008-07-02 05:59:51 +0000
@@ -530,7 +530,11 @@
nodes_and_keys = next_nodes_and_keys
# We should now be at the _LeafNodes
node_indexes = [idx for idx, s_keys in nodes_and_keys]
- nodes = self._get_nodes(node_indexes)
+ # This bypasses the cache, but only for the leaf nodes
+ # We do it right now, because otherwise we swap the cache,
+ # alternatively, we may *not* want to always read all the nodes in one
+ # big go. Consider setting a max size on this.
+ nodes = dict(self._read_nodes(node_indexes))
for node_index, sub_keys in nodes_and_keys:
node = nodes[node_index]
for key in sub_keys:
More information about the bazaar-commits
mailing list