git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Duy NguyenNext: Junio C Hamano
Message 4 of 5 in “git grep performance regression”
  1. Ross LagerwallJan 14, 2013
  2. Duy NguyenJan 15, 2013
  3. Duy NguyenJan 15, 2013
  4. Ross LagerwallJan 15, 2013
  5. Junio C HamanoJan 15, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.