Thoughts on file ids
Jelmer Vernooij
jelmer at samba.org
Sun May 8 11:56:23 UTC 2011
On Fri, 2011-05-06 at 16:06 +0200, John Arbash Meinel wrote:
> On 05/06/2011 03:42 PM, Martin Pool wrote:
> > Yeah, I was thinking of wt access possibly being simpler and faster by
> > name, but you're right this will need testing and may well be a problem
> > for committed trees.
> >
>
> I think right now any api which is performance sensitive takes a "path"
> hint. And I know we make use of it in many places. dirstate itself
> prefers to lookup by path, because it stores things by path. If you pass
> a file-id it reads all entries and creates a file_id => path mapping.
>
> We do this because WT level operations are, indeed, generally done by
> path (status path, commit path, etc.) but repository level operations
> are generally done by file-id (log over history of a file, diff, etc.)
The one thing I've always wondered about this API is that while it
allows you to pass in the path, it also requires you to have (possibly
lookup) the file id. Is that never an issue in terms of performance?
Cheers,
Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20110508/58196938/attachment.pgp>
More information about the bazaar
mailing list