[MERGE] Lock working trees inside cmd_diff to avoid multiple locks and unlocks

John Arbash Meinel john at arbash-meinel.com
Fri Nov 30 17:12:49 GMT 2007


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

Lukáš Lalinský wrote:
> Hi,
> 
> every time a repository is unlocked and locked, all indexes need to be
> re-read (for "diff -c" that means reading the revision index twice). It
> is especially visible with packs where the indexes are rather big. This
> patch adds a global lock to cmd_diff, which avoids the multiple locks.
> 
> Here are some times for "bzr diff -c 3000 >/dev/null" on a pack-0.92
> repository.
> 
> bzr.dev:
> 
> real    0m2.262s
> user    0m1.952s
> sys     0m0.112s
> 
> bzr.dev with this patch:
> 
> real    0m1.322s
> user    0m1.192s
> sys     0m0.088s
> 
> Lukas
> 
> 

This breaks the "bzr diff -r branch:..." test.

I submitted a patch for it a while ago. It is actually broken because "branch:"
is a broken revision spec, though. So it certainly could be better to disable
that test, and fix diff.

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

iD8DBQFHUESQJdeBCYSNAAMRAjm4AJ0Vk/9ddFRJFhrFvbp/VKotQpc6jwCfbiLd
I8fT14xRUeuDyR8banhOzrQ=
=ErRk
-----END PGP SIGNATURE-----



More information about the bazaar mailing list