[MERGE] Accelerate loom up-thread/down-thread operations

Aaron Bentley aaron at aaronbentley.com
Tue Mar 4 23:31:03 GMT 2008


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

Hi all,

This patch accelerates Bazaar's loom support on packs.

Looms use BzrBranch6.generate_revision_history, which is currently
slower than necessary.  It generates the lefthand history twice-- the
new implementation of generate_revision_history fixes that.

But generating the lefthand history uses get_revision_graph, which John
has already determined is inefficient.  The changes to _lefthand_history
use Graph instead, which is much more efficient.  As a side effect, it
may also accelerate other operations that use revision_history on
Branch6 branches.

Apparently, we missed BzrBranch.set_revision_info in our None =>
NULL_REVISION migration.  This pushes the None => NULL_REVISION
conversion out into the BzrBranch.set_revision_info methods, to simplify
the core functions.

down-thread TIMINGS (best of 3):
OLD:
real    0m15.824s
user    0m12.545s
sys     0m0.316s

NEW:
real    0m3.524s
user    0m2.596s
sys     0m0.212s

This is ~ 4.5x faster.

It's also worth noting that the loom format really needs an upgrade so
that it can use set_revision_info rather than generate_revision_history.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHzdu30F+nu1YWqI0RAiNgAJwNFyWihsfZlU2ns28T6lVg5KfYFACcCzRd
8nYCFHGFqoR0pR8Mst5ogC0=
=ppgM
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-mail-NhPD0G.patch
Type: text/x-diff
Size: 9259 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080304/2e16304f/attachment-0001.bin 


More information about the bazaar mailing list