[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Fast commits

From: Aaron Bentley
Subject: Re: [Gnu-arch-users] Fast commits
Date: Fri, 02 Apr 2004 13:19:48 -0500
User-agent: Mozilla Thunderbird 0.5 (X11/20040309)

Harald Meland wrote:

I'm not at all sure that I fully grasp this stuff -- but for local
files, could it be that some kind of stat()-using binary search for
the latest revision is faster than a full readdir()-based traversal?

I.e. start by stat(version-0); if found, do a binary search on the
versionfix-N part of Arch's revision name namespace, otherwise
stat(base-0) and do a binary search on the patch-N part.  If I
remember my big-Ohs correctly, this would make the lookup O(log N).

Hey, we can find out the number of revisions by doing statting the log directory and counting the links. If there's no version-0, we can calculate the latest revision with two O(1) operations!

If implemented, I'm not sure that this would satisfy Tom's "apparent
usefulness" vs "added bloat" standards.

Yep.  Same here.

Also consider that when doing
similar lookups over a potentially high-latency network, a order-once
ls(1)-like interface would probably beat a
ask-if-revision-exists-and-wait-for-answer stat() solution hands-down.

Yep.  I've been working with the local tree instead of the archive data.


Aaron Bentley
Director of Technology
Panometrics, Inc.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]