[MERGE] Sha files for the stat cache more lazily rather than on first-examination, allowing less overall sha calculations to occur.

Robert Collins robertc at robertcollins.net
Tue Sep 23 07:24:01 BST 2008


This changes dirstates update_entry method to be a little less
aggressive about when to perform sha calls. Possibly it could be made to
never sha, but I haven't audited enough to say if thats a good idea or
not.

Anyhow, this change is quite modest, is safe for all callers I could
find, passes all tests, and results in no sha1 calculations for brand
new files in the tree, which was the primary case I was concerned about,
because that common case shows up heavily - it can easily cause cache
thrashing for people.

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iter-changes-less-sha1-3712.patch
Type: text/x-patch
Size: 31874 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080923/6f9e2df7/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080923/6f9e2df7/attachment-0001.pgp 


More information about the bazaar mailing list