[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

Hash: SHA1

The current 'bzr viz' command has a performance issue when running on
large branches. Basically, it loads all Revisions before it displays

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.... :)

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

-------------- 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