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

Re: [RFC PATCH 3/3] grep: don't add submodules to the alternates list

From
BWBrandon Williams <bwilliamseng@gmail.com>
Date
Sep 21, 2019, 21:58 UTC
Message-ID
<CALN-EhSnadjdgdpbuZhj5tDQe5a8uQ6CBnDgh4CZ-AG3JuU_LA@mail.gmail.com>
In-Reply-To
<fc5f5fe95c10ac66d1234a025122c8866965021f.1568771073.git.matheus.bernardino@usp.br>

On Tue, Sep 17, 2019 at 6:56 PM Matheus Tavares <matheus.bernardino@usp.br> wrote:

Show 15 quoted lines
>
> When grepping with --recurse-submodules, the object directory of the
> submodule is added to the in-memory alternates list. This makes git need
> to watch out for more packfiles which might bring bad consequences for
> memory and performance.
>
> Now that raw_object_store is a member of the struct repository, it's
> possible to use the submodules' instances directly, without the need to
> add its odbs to the alternates list. So let's instead pass the subrepo
> down to the threads and replace function calls which use
> the_repository by default for their more general counterparts. Also,
> submodule cleanup must be refactored as calling repo_clear() at the end
> of grep_submodules(), might free the subrepo's resources before threads
> have finished working on it. To do that, let's keep track of the
> workers progress and only call repo_clear() when it's safe to do so.

This is incredibly exciting. Glad to see the effort that were started years ago to finally come to fruition.

Previous: Matheus TavaresNext: Junio C Hamano
Message 5 of 11 in “grep: don't add subrepos to in-memory alternates”
  1. 0/3 grep: don't add subrepos to in-memory alternatesMatheus Tavares, Sep 18, 2019
  2. 1/3 diff: use the given repo at diff_populate_filespec()Matheus Tavares, Sep 18, 2019
  3. 2/3 object: allow parse_object_or_die() to handle any repoMatheus Tavares, Sep 18, 2019
  4. 3/3 grep: don't add submodules to the alternates listMatheus Tavares, Sep 18, 2019
  5. Brandon WilliamsSep 21, 2019
  6. Junio C HamanoSep 18, 2019
  7. Matheus Tavares BernardinoSep 19, 2019
  8. Junio C HamanoSep 20, 2019
  9. Matheus Tavares BernardinoSep 21, 2019
  10. Junio C HamanoSep 28, 2019
  11. Matheus Tavares BernardinoSep 28, 2019

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.