Re: git grep performance regression
- From
Ross Lagerwall <rosslagerwall@gmail.com>
- Date
- Jan 15, 2013, 07:36 UTC
- Message-ID
- <20130115073628.GA647@hobo.wolfson.cam.ac.uk>
- In-Reply-To
- <CACsJy8AnABCisgSVL7Qh_-uejAJA3x1kzy=4i+uXm3+90m5tuA@mail.gmail.com>
On Tue, Jan 15, 2013 at 11:38:32AM +0700, Duy Nguyen wrote:
Show 6 quoted lines
> 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