Slow inventory extraction from weavefile

Martin Pool martinpool at gmail.com
Tue Oct 4 08:47:38 BST 2005


On 04/10/05, James Blackwell <jblack at merconline.com> wrote:
> On Tue, Oct 04, 2005 at 01:09:19PM +1000, Robert Collins wrote:
>
> > > John A Meinel <john at arbash-meinel.com> writes:
> > > I have also noticed this.  Things like "bzr log FILE" has become
> > > _really_ slow.
> >
> > However, it can be made EVEN FASTER now. With the changes just landed
> > (like 5 minutes ago), any change that affects a file with text (i.e. not
> > symlinks) results in a TOC entry in the files weave. So we can identify
> > revisions the file was altered in without reference to the inventory at
> > that time.
>
> Just to sanity check here, you mean 'EVEN FASTER than it was before
> weave'? As in there's obvious optimizations to be done that will make
> things better than prior to weave.

Yes, in the new format you can directly extract the history graph for
any chosen file.  So 'bzr log foo.c' only needs to read the current
inventory (to get foo's id), the weave for foo.c (once), and then the
inventories and revisions in which it was changed (to get the
messages).  So it should be faster than in 0.0.8, especially for
rarely changed files in large trees.

'bzr log src/' needs to read each inventory to find any changes under
that directory, so this will be slow until we fix the bugs mentioned
earlier in this thread.

verbose log (ie showing the changeset summaries) needs to retrieve and
diff all the relevant inventories so it will still be bounded by
inventory retrieval speed.

--
Martin




More information about the bazaar mailing list