performance heads up...path2id

Robert Collins robertc at robertcollins.net
Mon May 22 05:58:30 BST 2006


On Mon, 2006-05-22 at 00:33 -0400, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Robert Collins wrote:
> | Quite a bit of code uses 'path2id' routinely. This is a heads up - our
> | current datastructure makes that call relatively expensive - we split
> | the path and then walk the tree. Where possible, if you are doing loops
> | over trees or the like, try to use id's more often, or get and hold the
> | inventory entry of the file you are manipulating rather than looking it
> | up afresh each time.
> 
> Yes, I knew that, but I was trying to avoid premature optimization.  I
> guess we've gotten to the point that it's not premature anymore.

Oh, its not just your code :). I wasn't naming names because there are
many culprits :).

Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060522/e44162ef/attachment.pgp 


More information about the bazaar mailing list