"bzr log" by revision-id is slow

Eli Zaretskii eliz at gnu.org
Thu Oct 13 10:39:13 UTC 2011


> Date: Thu, 13 Oct 2011 12:08:09 +0200
> From: John Arbash Meinel <john at arbash-meinel.com>
> CC: Eli Zaretskii <eliz at gnu.org>, bazaar at lists.canonical.com, 
>  John Arbash Meinel <john.meinel at canonical.com>
> 
> > I agree it's a bit surprising that it seems to be entirely
> > independent of the position in the ancestry; I wonder if it's bulk
> > loading the whole graph in advance to minimise the worst-case cost?
> > Hmm, it's possible that because of edge cases calculating the
> > dotted revno would often need to go as far back as the origin.
> > 
> 
> 'bzr log' is using RevisionSpec.in_history() which calls
> Branch.revision_history(). Which always loads all the history. It may
> not need to, but that is what it does today.

You mean, it does that when the revision is given by its revision-id?
Because using the revnos is much faster.

Anyway, I filed a bug about slow "bzr log" with revision-id's, and I
really hope it could be sped up to be as fast as revno's (or even
faster, since Andrew says finding the revision object by its
revision-id is an O(1) complexity operation).  If showing the revno is
what takes most of the time in this case, I'd suggest to make that
optional.



More information about the bazaar mailing list