From: Ross Lagerwall Date: Tue, 15 Jan 2013 07:36:28 GMT Subject: Re: git grep performance regression Message-ID: <20130115073628.GA647@hobo.wolfson.cam.ac.uk> In-Reply-To: On Tue, Jan 15, 2013 at 11:38:32AM +0700, Duy Nguyen wrote: > dirlen is not expected to include the trailing slash, but > find_basename() does that. It messes up with the path filters for > push/pop in the next code. This brings grep performance closely back > to before for me. Ross, can you check (patch could be whitespace > damaged by gmail)? > Yes, that did seem to bring back the performance to the old level. I noticed that before the patch, the strace output was something like this: open("tools/vm/.gitattributes", O_RDONLY) = -1 ENOENT open("tools/vm//.gitattributes", O_RDONLY) = -1 ENOENT open("tools/vm//.gitattributes", O_RDONLY) = -1 ENOENT open("tools/vm//.gitattributes", O_RDONLY) = -1 ENOENT open("usr/.gitattributes", O_RDONLY) = -1 ENOENT open("usr//.gitattributes", O_RDONLY) = -1 ENOENT open("usr//.gitattributes", O_RDONLY) = -1 ENOENT open("usr//.gitattributes", O_RDONLY) = -1 ENOENT open("usr//.gitattributes", O_RDONLY) = -1 ENOENT open("usr//.gitattributes", O_RDONLY) = -1 ENOENT (and yes, the whitespace was damaged by Gmail!) Regards -- Ross Lagerwall