[GTK/MERGE] 'bzr viz --limit' shouldn't load unused Revisions
John Arbash Meinel
john at arbash-meinel.com
Fri Sep 21 18:44:29 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The current 'bzr viz' command has a performance issue when running on
large branches. Basically, it loads all Revisions before it displays
anything.
The code is written in a way that it tries to only load the ones it
actually needs, and even has a '--limit' option so you can display a
subset. However, the way the code is written, it has to analyze every
node (which is expected because 'merge_sorted' is a whole-graph
operation). The problem is that the colouring algorithm has to read the
'committer' for each node.
The attached patch just changes it so that the code that is doing the
colouring knows when certain nodes can be ignored, and therefore apply
the 'NULL' color to them.
With this patch, if I do "time bzr viz --limit 10" in bzr.dev, and then
hit the close button (so that it closes as soon as the populate_model
function returns) I get:
TRUNK: 10.877 total
patched: 2.233 total
On a much larger tree I have lying around with 45k revisions, it changes
it from:
TRUNK: 65.15 total
patched: 7.559 total
So that is almost 10x faster. And let me say, waiting 1 minute for it to
start up is pretty unbearable. 8s is even pretty slow. Now if we had a
progress bar.... :)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFG9AL9JdeBCYSNAAMRAvRfAJ0TgTp0fHnf38g+VaiR5a2SVdyT7ACgvF1O
4DUIKJsw/FFKUhgRljSwJu0=
=+iJa
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gtk_limit.patch
Type: text/x-patch
Size: 5058 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070921/fb33a927/attachment.bin
More information about the bazaar
mailing list