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

Re: [PATCH v1] add: speed up cmd_add() by utilizing read_cache_preload()

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 3, 2018, 00:38 UTC
Message-ID
<xmqqmuqrngfu.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CACsJy8CVPSe8TWYMrK9MiRCaG36qyWfd42cEPo5844XWuTmqew@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 10 quoted lines
> On Fri, Nov 2, 2018 at 2:32 PM Ben Peart <peartben@gmail.com> wrote:
>>
>> From: Ben Peart <benpeart@microsoft.com>
>>
>> During an "add", a call is made to run_diff_files() which calls
>> check_remove() for each index-entry.  The preload_index() code distributes
>> some of the costs across multiple threads.
>
> Instead of doing this site by site. How about we make read_cache()
> always do multithread preload?
I suspect that it would be a huge performance killer. 

Many codepaths do not even want to know if the working tree files have been modified, even though they need to know what's in the index. Think "git commit-tree", "git diff --cached", etc.

Previous: Duy NguyenNext: Duy Nguyen
Message 5 of 6 in “add: speed up cmd_add() by utilizing read_cache_preload()”
  1. add: speed up cmd_add() by utilizing read_cache_preload()Ben Peart, Nov 2, 2018
  2. Junio C HamanoNov 2, 2018
  3. Ben PeartNov 2, 2018
  4. Duy NguyenNov 2, 2018
  5. Junio C HamanoNov 3, 2018
  6. Duy NguyenNov 3, 2018

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.