The last of my patches is queued up to land, so I figured I’d post an update about the performance improvements I’ve been working on. I’m also just excited about how well it has all come together.

There were essentially 3 changes that mattered for performance on large trees.

  1. Fixing iter_entries_by_dir() to preload the data in Repository- optimal ordering rather than by-request ordering. In large trees this was causing us to thrash and become pathologically slow. In the 70,000-file test tree, thrashing took about 3 minutes, the preloading version takes about 15s. This affected a lot of our commands, though I guess the next two fixes would actually reduce the number of commands affected by this.
  2. Fixing several code paths to use optimized iter_changes() rather than the generic iter_changes(). The generic path walks both inventories iter_entries_by_dir() and compares them. Our 2a format Repository can do iter_changes without loading the whole tree. (It internally uses a hash_trie to store the inventory, and so nodes with matching sub-trees can be skipped for comparison.) This generally shows up as something that was taking 15s (to load the whole inventory) dropping to <2s for the improved comparison. (bzr revert and bzr pull were both directly impacted here)
  3. Changing WT.set_parent_trees([one_tree]) to update itself using current_basis.iter_changes(one_tree), rather than setting the state from scratch. This basically adds another case where we can avoid reading the whole inventory state again, which is another 15s to <2s sort of change. This only showed up after fixing (2), because once the tree is loaded, the other actions are generally pretty quick. (bzr up, bzr pull)

This is the chart I put together for “whats-new-in-2.4.txt”. bzr-2.3.2 will have fix (1), but not (2) or (3), to give a feel for how much of an impact different fixes have had.

    bzr-2.3.1 bzr-2.3.2 bzr-2.4  action
    3m39s         1m08s   1m03s  bzr co --lightweight
      38s            8s      2s  bzr revert (in a clean tree)
    4m47s         3m56s     15s  bzr merge
    4m45s           20s      3s  bzr pull
    4m58s         3m00s      2s  bzr up
    9m33s           21s     19s  bzr uncommit (including a merge)
    4m44s           17s      2s  bzr uncommit (simple commit)

So yes, some operations that were taking almost 5 minutes have now dropped down to taking <3s.

You won’t see that dramatic of an improvement for smaller trees, though most cases will have a pleasant improvement. Here is a short list for the ‘Launchpad‘ tree (with ~8k items).

    bzr-2.3.1   bzr-2.4     action
    5.3s        5.2s        bzr co --lightweight
    0.9s        0.3s        bzr revert
    1.4s        0.4s        bzr pull
    3.9s        3.7s        bzr uncommit (with merge)
    0.9s        0.3s        bzr uncommit (without merge)

Anyway, I’m quite happy about how much better bzr-2.4 will be in large trees.

update:Add graphs…

Martin Pool

new shelve/unshelve GUI

Iwata is working on a new GUI for interactively shelving and unshelving changes, which is a way in Bazaar for temporarily setting aside some changes from your working tree. (At the moment there is an interactive text interface for shelving.)


Thanks to our contributors we have a plenty of new exciting features and improvements in upcoming 0.21 release. I would like to give you a short tour over some of new features.

qdiff dialog now has new look and feel based on the nice toolbar (similar toolbar Gary has added for qannotate in past releases):

qdiff toolbar

New toolbar in qdiff dialog

As you can see qdiff now has Find text feature, you can invoke this mode clicking by “Find” button on toolbar (or using Ctrl+F hotkey):

Find in qdiff


search: not found (as in firefox)

Not found

qdiff options are in View Options submenu on toolbar, you’ll find there “Complete” knob (to see full-text for all changed files),  encoding selectors (for every pane) and even new knob: Ignore whitespace changes.

qdiff options submenu

qdiff options

You can also force option “Ignore whitespace changes” from command-line with new qdiff command-line option –ignore-whitespace (short form -w).

Also, now you can control the size of tab characters in qdiff, qannotate and qcat windows via configurable option (tab_width). You can set this option either in bazaar.conf or individually for branches in their branch.conf. Global option can be edited via qconfig dialog:

qconfig dialog

Configure tab width via qconfig

Other improvements in upcoming release also include changes to qinfo dialog (it now shows the same information as CLI bzr info), qcommit now remembers “Show non-versioned” knob state, you can open files in their native applications while browsing treeless branches (or branches on remote servers) and other changes (see NEWS.txt for the full list of improvements and bugfixes).

Many thanks to all people who help us make new QBzr release awesome, especially: A. S. Budden, Dorin Scutarașu, Glen Mailer and many others, see NEWS.txt for details.

Martin Pool

bzr support in Qt Creator

Hugues Delorme has added support for Bazaar into Qt Creator 2.2 beta.

Martin Pool

updated bzr nightly packages

Bazaar nightly Ubuntu packages are available from ppa:bzr/daily. The old ppa, ppa:bzr-nightly-ppa/ppa was out of date and has just been deleted.

To get nightly bzr builds on Ubuntu, say:

sudo add-apt-repository ppa:bzr/daily
sudo apt-get update
sudo apt-get install bzr

and as of today you should get a 2.4 beta snapshot.

Martin Pool

A new plugin bzr-wincrypt stores passwords encrypted in the Windows CryptoAPI keyring.

Martin Pool

bzr-pipelines demo video

A 5min demo showing how large features can be managed easily in small interdependent branches using bzr pipeline, with a few nice Launchpad integrations built in.



bzr now running on Natty + python 2.7

We just did one final tweak to bzr to be compatible with python2.7 for natty.

Vincent tells us that babune is finally blue running the test suite, and Jelmer says that the daily builds of python now finish for natty. Yay!

Martin Pool

testers needed for bzr-svn on hardy and Jaunty

maxb has built packages of bzr-svn and its dependencies into ppa:bzr/proposed, including a new and much better version of the Subvertpy subversion bindings.  He is looking for positive or negative test results from people using these on Ubuntu hardy and jaunty.  If you do use bzr-svn on those OS releases, please give them a try, or at least Max know (here or on the list) that you care about getting updates…

Martin Pool

congratulations, Jelmer

I’m enormously pleased to announce that Jelmer Vernooij will be joining the bzr team at Canonical on a full-time basis from January next year, replacing Robert Collins (who recently became Launchpad’s technical architect). Jelmer has contributed to Bazaar over many years including driving the svn and git foreign branch plugins and the bzr-rewrite plugin.

Jelmer already works at Canonical on the Launchpad team, and has recently been involved with the recipe builds feature that automatically assembles deb packages from the contents of upstream branches. We will very likely look to hire someone to replace Jelmer on the Launchpad team, through the Canonical jobs page.

I got a lot of very good applications from the bzr community and beyond, and I just wish I could work full time with more of you. Thanks to everyone who did apply.