[patch] Hashcache fix

John A Meinel john at arbash-meinel.com
Tue Dec 27 21:55:46 GMT 2005


Aaron Bentley wrote:
> Hi all,
> 
> I've fixed the hashcache.  It was a trivial fix; the WorkingTree
> destructor was where the cache was written out, but that had been
> deleted at some point.
> 
> In this version, I've hooked it up to WorkingTree.unlock.  I'd be happy
> to hear a better suggestion, but at least this is deterministic.
> 
> Same old place:
> http://panoramicfeedback.com/opensource/bzr/bzr.ab/
> 
> Aaron

+1 from me, Which I believe gives us the 2 required. :)

I looked into it in the past (with my cache-stat branch).
I don't really recommend that branch, because it does a lot of other
work for little benefit. I was able to shave off about 1/8th of the time
by decreasing os.stat() calls to about 1/file, and saving the results in
memory. And that was on bigger trees than bzr.dev. (I have one with
about 1.6k files, nothing as big as Michael Ellerman's 20k files).

Anyway, writing out the hashcache at WorkingTree.unlock() seems correct
to me. The only thing I would add to your changes is to delete the
comment about "we could write this at unlock() time" since we are now
doing it then.

John
=:->

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


More information about the bazaar mailing list