[PATCH RFC] faster dirstate walks

Chris Mason mason at suse.com
Thu Aug 25 13:48:03 CDT 2005


On Thu, 25 Aug 2005 11:38:49 -0700
Bryan O'Sullivan <bos at serpentine.com> wrote:

> On Thu, 2005-08-25 at 14:29 -0400, Chris Mason wrote:
> > 2) os.walk yields every file and subdir to dirstate.traverse who
> > yields every file and everything in the dirstate map.
> > dirstate.walk then filters this mass and yields every file to the
> > caller.  There should be fewer steps in here.
> 
> Do you think that makes a performance difference, or do you just not
> like it?

It makes a difference, about 5-10% in testing here.

> 
> > I've turned os.walk into something hg specific that takes all the
> > dirstate ignore and matching rules into account.  The new function
> > also takes an optional function (interesting()) the caller can
> > supply to help filter out files it doesn't care about.
> 
> What's the difference between interesting and matchfn?

Heh, match is yours and interesting is mine?  I suppose I can combine
things.

[ other stuff ]
ack

-chris


More information about the Mercurial mailing list