[MERGE] Add an InventoryEntry cache for xml deserialization

John Arbash Meinel john at arbash-meinel.com
Sat Dec 13 04:34:06 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

...
>> 4) I've been considering restructuring things so that the repository
>>    passes the entry_cache to self._serializer.deserialize_inventory(),
>>    as this makes it obvious that the lifetime of the cache is bound to
>>    the Repository. Which helps for us to know that the caching rules
>>    won't be violated. The main downside is that something that ends up
>>    dealing with two mostly-identical repositories will not benefit.
>>
>>    The original use-case I was trying to handle is the "extract all
>>    revision trees from the repository" which works just fine here, but
>>    there are other use cases where an entry cache would be helpful.
> 
> I'd be inclined to start with 4) and see how it goes.

See attached. It isn't particularly difficult. Testing shows the same
effective performance as the global cache for the single repository
scenario.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklDOz4ACgkQJdeBCYSNAAMXjACfdVtiUBD80DYFDFcJZCKD1bPd
x7IAoM9U7ovVZIkDL2Zh37tbtGbZXYfX
=kSLz
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xml_cache.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20081212/e8fb02a7/attachment-0001.diff 


More information about the bazaar mailing list