[MERGE] Graph.find_distance_to_null

John Arbash Meinel john at arbash-meinel.com
Fri May 23 00:17:48 BST 2008


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

This patch has 3 performance improvements applied.

1) The new Graph.find_distance_to_null (formerly find_revno), which can use
extra revision_id information to find the new revno, rather than searching all
of history.

2) Branch.push() and Branch.pull() pass a Graph object into update_revisions,
with the bias that 'self' is considered the closest repository. This should help
'heads()' checks during push to not have lots of get_parent_map() calls to the
remote repository, etc.

3) Branch.push() passes 'overwrite' into update_revisions. pull had already been
using it. This should significantly improve performance for "bzr push
- --overwrite" with diverged branches. (It previously was doing graph searches on
the remote end, and that included determining the entire revision_history.)


#1 changes a local 'bzr branch -r -10 x y' in a shared no-trees repository from
4.3s down to 1.9s.

I haven't done much performance testing of the rest, but I expect it to help as
well. Specifically I would expect that "bzr push REMOTE" is going to be a lot
faster, since the 'heads()' check is going to be done locally.

Also, Aaron, you might want to check how this works with pushing your diverged
branches. I would expect big wins there, too.


Probably the biggest concern is adding an optional 'graph=XXX' parameter to
update_revisions, since that is probably something bzr-svn is going to need to
add, which requires a new release to coincide with bzr.

John
=:->

PS> This may step on some of what Andrew is doing, but I think he is changing
the RemoteBranch stuff more than the raw Branch objects.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkg1/xwACgkQJdeBCYSNAANpMgCfdaP9XciP6QR/l101fv3kHL/L
RyIAoLC/cXpx2X1Ka3MEHZEMJGo6G8Xw
=T80z
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: graph_find_distance_to_null.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20080522/3ee4c32e/attachment-0001.diff 


More information about the bazaar mailing list