[PATCH RFC] faster dirstate walks

Matt Mackall mpm at selenic.com
Fri Aug 26 02:29:24 CDT 2005

On Fri, Aug 26, 2005 at 01:19:33AM -0400, Theodore Ts'o wrote:
> On Thu, Aug 25, 2005 at 08:39:08PM -0700, Matt Mackall wrote:
> > On Thu, Aug 25, 2005 at 10:26:46PM -0400, Theodore Ts'o wrote:
> > > On Thu, Aug 25, 2005 at 09:56:51PM +0200, Florian Weimer wrote:
> > > > In practice, sorting by file name is almost as good as sorting by
> > > > inode number if they files have been created in lexicographic order.
> > > 
> > > And that would be true when?  It certainly isn't normally the case.
> > 
> > It's the case for checkout, so going in sort order usually does in
> > fact tend to visit things in creation order, and thereby in disk
> > layout order.
> But only if you are doing a checkout from scratch, right?  If you have
> a working directory which is maintained over a long period of time, as
> files get created, removed, and renamed, the lexicographical sort of
> the filename will graduately have less and less correlation with the
> creation order.

Yes. The point is mostly that "defragmenting" is simply a matter of
cloning a fresh copy. We'll get most of that goodness simply by having
a breadth-first tree-walking pattern though.

Mathematics is the supreme nostalgia of our time.

More information about the Mercurial mailing list