[MERGE] Significantly reducing execution time and network traffic for trivial case of `bzr missing`
John Arbash Meinel
john at arbash-meinel.com
Wed Mar 12 21:31:37 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Belchenko wrote:
| Running `bzr missing http://bzrdev.bialix.com/fast-missing/`
| from local mirror of fast-missing branch (i.e. branches are identical)
| with bzr 1.2
| I get:
|
| data received: 2135 KB
| data sent: 60 KB
| execution time: 191.094 seconds
|
| With this patch I get:
|
| data received: 5 KB
| data sent: 3 KB
| execution time: 7.875 seconds.
|
I think there are better ways of doing this by using the Graph functionality. If
'find_differences()' was actually correct it would be a trivial:
graph = local_branch.repository.get_graph(remote_branch.repository)
left_revno, left_revision_id = local_branch.last_revision_info()
right_revno, right_revision_id = remote_branch.last_revision_info()
(left, right) = graph.find_differences(left_revision_id, right_revision_id)
However, as it still needs to call last_revision_info, we can easily slot in
your change here.
So....
BB:approve
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH2Eu5JdeBCYSNAAMRAllhAKDS1bKq08M6/xZJv6zZR/Wkf/pnQgCgvO2R
EJd4QjKlE0eh2AIfgsqEkRI=
=VVq9
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list