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

Re: git grep --threads 12 --textconv is effectively single-threaded

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 8, 2020, 21:06 UTC
Message-ID
<xmqqfta11zu0.fsf@gitster.c.googlers.com>
In-Reply-To
<20200708201353.GA2354599@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> It's probably possible to teach the grep code to do the same
> check-in-the-index trick, but I'm not sure how complicated it would be.

I am not sure if we should even depend on the "check the object database and use it instead of reading the working tree files" done in diff code---somehow I thought we did the opposite for performance (i.e. when we ought to be comparing two objects, taken from tree and the index, if we notice that the index side is stat clean, we can read/mmap the working tree file instead of going to the object layer and deflating a loose object, or, worse yet, construct the blob by repeatedly applying deltas on a base object in a packfile).

Is this one in the opposite direction done specifically for gaining performance when textconv cache is in use? If so, kudos to whoever did it---that sounds like a clever thing to do.

Previous: Jeff KingNext: Jeff King
Message 5 of 7 in “git grep --threads 12 --textconv is effectively single-threaded”
  1. Zach RiggleJul 7, 2020
  2. Jeff KingJul 7, 2020
  3. Zach RiggleJul 8, 2020
  4. Jeff KingJul 8, 2020
  5. Junio C HamanoJul 8, 2020
  6. Jeff KingJul 9, 2020
  7. Junio C HamanoJul 10, 2020

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.