diff performance & tree.lock/unlock

Robert Collins robertc at robertcollins.net
Thu Jan 12 13:03:56 GMT 2006


so - diff is now very slow:

the 'Tree' interface does not have lock_read() and unlock methods, so
compare_trees rightly does not lock and unlock its trees. But, some
WorkingTree methods lock and unlock (because they need to) which results
in at least 1 hash cache write per file in the tree.

I think its reasonable that the Tree interface be for mutable trees -
and that it provide a lock_read() and lock() in the interface. These
would be noops for some trees, would lock their source branch for
others, and would for WorkingTree be the current lock_read() and
unlock().

Thoughts?

Thanks to Duchier btw for highlighting this on IRC.

Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060113/7ead76e0/attachment.pgp 


More information about the bazaar mailing list