bzr too slow

John Arbash Meinel john at arbash-meinel.com
Tue Jan 10 15:27:39 GMT 2006


Denys Duchier wrote:
> John Arbash Meinel <john at arbash-meinel.com> writes:
> 
> 
>>Well, that could certainly be a problem. But it isn't entirely true. It
>>only does so if the hash-cache says it is unclean. (If a file being read
>>had a new stat result).
> 
> 
> yes, I am well aware of that
> 
> 
>>Which means if you have never done a 'bzr status' before, it probably
>>will write a few too many times.
> 
> 
> and that's exactly what I meant. try it with a linux tree after you have touched
> every file. it takes a transfinite amount of time ;-)
> 
> it really is _not_ reasonable to write it out every time.  I understand that
> it's a lot easier, but it is still wrong.
> 
> Cheers,
> 
> --Denys

Well, I would say that touching every file is hopefully an uncommon
occurance :)

I'm curious what is taking so many read/write locks out on the
WorkingTree. But there are a lot of @needs_read_lock functions.

If it turns out that the specific hot-spot is writing out the
hash-cache, then I agree completely that it is worth fixing. You could
even do an easier check and use strace(), if there are an excessive
number of open(.bzr/stat-cache) calls, then it is something that needs
to be fixed.

There are a lot of things that could be slow, which is why I would wait
for a report before we optimize the wrong thing.

As far as if it is the problem, the two ways I see to fix it, is to either:
a) Change the unlock() interface so that it returns True when it
actually unlocks the lock, rather than just decrementing a reference.
b) Have WorkingTree peek at self.branch._lock_count, but since that is
private, I don't prefer to peek.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060110/ba26d694/attachment.pgp 


More information about the bazaar mailing list