[MERGE] make 'install_bundles' much cheaper

Alexander Belchenko bialix at ukr.net
Fri May 4 10:38:37 BST 2007


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

John Arbash Meinel пишет:
> So I sorted out the bug with install_bundles.
> 
> We had a loop around each revision, which called 'revision_tree()'.
> Inside that function, it would call
> '_validate_referencese_from_repository'. With the idea that if we have a
> revision in a bundle which is already present in the repository, we
> should make sure their sha1 sums, etc match.
> 
> The bug was that after installing the first revision, suddenly it is in
> the repository, so we validate it on the next call. And then again when
> installing the *next*, and the next and the next.
> 
> It led to obviously bad behavior.
> 
> The attached patch just does one simple thing. If we have already
> validated all we can with this bundle, don't do it again.
> 
> It drops the "install_bundle" times drastically, and without loss of
> correctness.
> 
> 
> bzr selftest --benchmark Install.\*few_files_small_tree_100_revision
> 
> test_few_files_small_tree_100_revision   OK     1354ms/    5720ms
> test_few_files_small_tree_100_revision   OK    38071ms/   42625ms
> 
> I'll let you figure out which one is with and without the patch.
> 
> 
> This patch also adds switches to "pretty" read lock decorators if you
> are using '--lsprof-timed', since it makes it much more obvious what
> functions are causing overhead.

Your patch reduce pulling time mentioned in my previous mail from 2 hours
down to 18 minutes on the same machine. Incredible!

[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGOv8czYr338mxwCURAp0sAJ9h4QvTnaTUB1+WljEFTSPonbPrvQCfSHxn
Ri0oa8A1oGua4S5V+xKrRCc=
=LqS1
-----END PGP SIGNATURE-----



More information about the bazaar mailing list