bzr heads help

Martin Pool mbp at canonical.com
Tue Aug 30 05:35:16 UTC 2011


On 30 August 2011 15:21, David Muir <davidkmuir at gmail.com> wrote:
> Two issues:
>
> 1. I noticed that running bzr heads --all on a relatively small
> repository (~1800 revs) takes quite a long time:
>
> $ bzr heads --all --debug-time
> get heads: 0.134533882141
> make head marks: 79.3243851662
>
> Fetching just the live heads takes just as long.
> Is it supposed to be that slow?

No, it's not supposed to be slow.  Running it on bzr which has much
more history takes 19s: faster would be better, but this is
proportionally much faster.

A good way to debug this, if you want to work on it, is to add
'--lsprof-file heads.callgrind' and then load that up in kcachegrind.
It looks to me like it spends a lot of time recursing to find the
possible branches under the repository and that might fairly easily be
improved by for example telling it not to look recursively inside
checkouts, or perhaps not to distinguish live and dead heads.

> 2. What is the difference between live and dead heads? My guess is that
> a live head is one that exists in a branch, but has not been merged into
> any other branch?

I think that's right.

m



More information about the bazaar mailing list