Possible performance improvement

John A Meinel john at arbash-meinel.com
Wed Oct 26 02:43:04 BST 2005


I'm just thinking out loud here. But I was wondering, what if we kept
the last revision inventory out of the weave, as something like
".bzr/last-inventory".
When you commit, pull, etc this gets created once. Then all commands
that need to compare versus the current head, can check it (bzr status,
bzr commit, etc). That way they don't have to unpack the weave each time.

If we did this, then I would recommend that we add a field indicating
the revision_id of the given inventory, so that we can check and make
sure someone didn't manually modify the revision-history, or somesuch.

My personal recommendation is to have the first line be the
revision-history, and then the rest be a standard <inventory>. So you
can open the file, read the first line to check what revision it is, and
then either parse it, or go back to the weave if you need it.

This may not be a big benefit, but I'm guessing part of the slowness of
"bzr status" is unpacking everything.

In fact, we could actually keep the "last-inventory" as a python pickle.
To save loading time. As long as "bzr branch" and "bzr pull" don't copy
it, and only re-create it, I think it isn't too much of a security risk.

John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051025/3e61cdaa/attachment.pgp 


More information about the bazaar mailing list