compressed weaves, and revision.weave

Michael Ellerman michael at ellerman.id.au
Fri Oct 28 06:07:17 BST 2005


On Fri, 28 Oct 2005 14:32, John A Meinel wrote:
> Michael Ellerman wrote:
> > Numbers for format 7 compressed:
> >
> > concordia ~/src/work/ckexec$ time $cbzr st
> > real    6m40.589s		<-------- WOW
> > user    0m23.455s
> > sys     0m4.864s
>
> The first time you run "status" or some of the other commands, bzr
> updates the .bzr/stat-cache file.
> This file indexes files based on their path, and keeps their sha1 hash,
> linked to their stat result.
> Which means the first time you run "bzr status", it has to compute the
> sha1 has of *every* file.

Yeah I figured it was the stat/hash-cache. It'd be nice if upgrade did that 
for you, it could even serve as a test (of sorts) that the upgrade succeeded.

> 8< snip

> One obvious place that we are doing extra work is in status.py
> list_paths(). It looks like we have 2 generators (new.iter_conflicts() and
> new.unknowns()).
> Probably both of these go through the entire inventory, looking for a
> file which is either conflicted or unknown.
> On an inventory as large as yours, that is an extra 1.5s.
> This probably could be avoided with a combined call, which returns the
> status of the file (conflicted or unknown), which can be turned into a
> list, and printed out later.

Yeah I was looking at that too. I was thinking they should be folded into 
compare_trees, so we have only one loop.

It'd also be nice if compare_trees was a generator, so we can start printing 
results almost immediately (this is nice if you're running "bzr st | less"), 
but that makes sorting impossible. 

> So I'm guessing that long term, format 7 would stay a little slower than
> format 6, but it shouldn't get worse.

That could be good. They say disk is cheap, but it's not _that_ cheap, 
especially for laptops. So if the compressed format is only ~10-20% slower it 
might be a reasonable trade off, at least for trees that you don't interact 
with much.

cheers

-- 
Michael Ellerman
IBM OzLabs

email: michael:ellerman.id.au
inmsg: mpe:jabber.org
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051028/fb0e3be8/attachment.pgp 


More information about the bazaar mailing list