Rev 3888: Add some actual timings, supporting why we use a FIFOCache. in http://bzr.arbash-meinel.com/branches/bzr/1.11/xml_cache
John Arbash Meinel
john at arbash-meinel.com
Wed Dec 10 17:47:49 GMT 2008
At http://bzr.arbash-meinel.com/branches/bzr/1.11/xml_cache
------------------------------------------------------------
revno: 3888
revision-id: john at arbash-meinel.com-20081210174726-7e0jy7j5kmq20alx
parent: john at arbash-meinel.com-20081210173820-sjxjc8ktpuhnl1g4
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: xml_cache
timestamp: Wed 2008-12-10 11:47:26 -0600
message:
Add some actual timings, supporting why we use a FIFOCache.
-------------- next part --------------
=== modified file 'bzrlib/xml8.py'
--- a/bzrlib/xml8.py 2008-12-10 17:38:20 +0000
+++ b/bzrlib/xml8.py 2008-12-10 17:47:26 +0000
@@ -365,6 +365,13 @@
file_id = elt_get('file_id')
revision = elt_get('revision')
# Check and see if we have already unpacked this exact entry
+ # Some timings for "repo.revision_trees(last_100_bzr_revs)"
+ # unmodified 4.1s
+ # using lru 3.5s
+ # using fifo 2.9s
+ # lru._cache 2.8s
+ # Note that a cache of 10k nodes is more than sufficient to hold all of
+ # the inventory for the last 100 revs.
key = (file_id, revision)
try:
# We copy it, because some operatations may mutate it
More information about the bazaar-commits
mailing list