brisbane:CHKInventory._extract_all_inventory

John Arbash Meinel john at arbash-meinel.com
Mon Mar 16 20:36:10 GMT 2009


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

I did some timing tests, and I found the current
"CHKInventory.iter_entries()" to be a lot slower than it needs to be.

Specifically, we try to be lazy about what nodes we page in, by passing
various filters to CHKMap.iter_entries() (using the parent_id_basename
map, etc.). This is very good if we don't need to touch every file (like
with iter_changes), but it turns out to be a *lot* of overhead when
doing something like Inventory.iter_entries() which will read everything
anyway.

The attached patch is my start at creating a function to single-pass
over the whole serialized inventory, and page it all into the in-memory
structure. This turned out to be a huge win for 'bzr ls -r -1' (approx
5s => 2s).

This isn't something I want to focus on right now, so if someone else
wants to pick it up, and finish polishing it, I would be happy to turn
it over. (I'm going back to work on lazy group extraction and a
byte-stream format for groupcompress blocks.)

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

iEYEARECAAYFAkm+uDoACgkQJdeBCYSNAAPrTwCeOuHTkbxniJvAxEs1zdO6wbV6
B9gAoMcoFR4YX3ei7hmTnVCFytPph3NT
=55Yr
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: brisbane-extract_all_inventory.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20090316/e6a6c803/attachment-0001.diff 


More information about the bazaar mailing list