[MERGE][RFC] further add performance improvements
Robert Collins
robertc at robertcollins.net
Fri May 19 15:00:29 BST 2006
here is a draft patch for another 100% improvement over what Martin and
I did this afternoon.
This patch refactors smart_add_tree to use the parent inventory entry
rather than looking up the path at every step along the tree. This gives
me a profiled performance of 5s for me on a 10K file tree, down from 10s
with the work we did earlier today, or 25s before tuning at all.
Its a little ugly because it has to allow the dry run mode to carry on
working, which is actually broken I think anyhow. Perhaps a 'dry run'
flag is actually better here? (That could trigger a
tree._read_inventory() rather than a write_inventory, for instance).
This would mean that the callbacks to add could always add, which means
we'd be able to get at the tree information more simply because the
parent would be guaranteed once we moved out of the user supplied files.
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-using-inventory-entry.patch
Type: text/x-patch
Size: 12727 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060520/2b31d5d0/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060520/2b31d5d0/attachment.pgp
More information about the bazaar
mailing list