At http://bzr.arbash-meinel.com/branches/bzr/1.11/xml_cache
------------------------------------------------------------
revno: 3885
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: John Arbash Meinel <[EMAIL PROTECTED]>
branch nick: xml_cache
timestamp: Mon 2008-12-08 12:30:41 -0600
message:
If we are going to thrash the inventory entry cache, increase its size.
=== modified file 'bzrlib/xml8.py'
--- a/bzrlib/xml8.py 2008-12-08 18:27:57 +0000
+++ b/bzrlib/xml8.py 2008-12-08 18:30:41 +0000
@@ -23,6 +23,7 @@
inventory,
lru_cache,
revision as _mod_revision,
+ trace,
)
from bzrlib.xml_serializer import SubElement, Element, Serializer
from bzrlib.inventory import ROOT_ID, Inventory, InventoryEntry
@@ -355,6 +356,10 @@
for e in elt:
ie = self._unpack_entry(e)
inv.add(ie)
+ if len(inv) > _entry_cache._max_cache:
+ new_len = len(inv) * 1.2
+ trace.note('Resizing inventory cache to %s', new_len)
+ _entry_cache.resize(new_len)
return inv
def _unpack_entry(self, elt):
--
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits