Rev 21: Use a 1000 page cache for benchmark results. in http://people.ubuntu.com/~robertc/baz2.0/plugins/index2/trunk
Robert Collins
robertc at robertcollins.net
Thu Jul 3 08:31:38 BST 2008
At http://people.ubuntu.com/~robertc/baz2.0/plugins/index2/trunk
------------------------------------------------------------
revno: 21
revision-id: robertc at robertcollins.net-20080703073137-c2201o4l8zhne7b2
parent: robertc at robertcollins.net-20080703061119-9pgnmpu1dj4qna2u
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Thu 2008-07-03 17:31:37 +1000
message:
Use a 1000 page cache for benchmark results.
modified:
btree_index.py index.py-20080624222253-p0x5f92uyh5hw734-7
=== modified file 'btree_index.py'
--- a/btree_index.py 2008-07-03 06:11:19 +0000
+++ b/btree_index.py 2008-07-03 07:31:37 +0000
@@ -41,6 +41,9 @@
_PAGE_SIZE = 4096
+# 4K per page: 4MB - 1000 entries
+_NODE_CACHE_SIZE = 1000
+
bloom_hits = 0
leaf_value_hits = [0, 0]
internal_node_hits = [0, 0]
@@ -365,7 +368,7 @@
self._root_node = None
# Default max size is 100,000 leave values
self._leaf_value_cache = None # lru_cache.LRUCache(100*1000)
- self._leaf_node_cache = lru_cache.LRUCache()
+ self._leaf_node_cache = lru_cache.LRUCache(_NODE_CACHE_SIZE)
self._internal_node_cache = lru_cache.LRUCache()
self._key_count = None
self._use_blooms = BTreeGraphIndex._default_use_blooms
More information about the bazaar-commits
mailing list