[PATCH RFC] faster dirstate walks

Chris Mason mason at suse.com
Thu Aug 25 13:57:46 CDT 2005


On Thu, 25 Aug 2005 20:47:31 +0200
Florian Weimer <fw at deneb.enyo.de> wrote:

> * Chris Mason:
> 
> > One big functional change is the results of dirstate.walk are no
> > longer sorted.
> 
> You should sort anyway before calling stat because that tends to
> reduce seek time with directory hashing on ext3 (this is crucial for
> cold-cache performance).  Sorting by inode number is even better, but
> Python probably doesn't provide it.

It might make ext3 dir hashing faster, but it will make other
filesystems slower. Sorting by inode number is better, but you can't do
that before the stat...

Bryan talked me into the sort on irc, it's not a huge performance
difference.

-chris


More information about the Mercurial mailing list