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

Re: git submodule, multi-threading the update process for large number of registered submodules

From
Jens Lehmann <jens.lehmann@web.de>
Date
Sep 2, 2014, 19:30 UTC
Message-ID
<54061AC2.9020705@web.de>
In-Reply-To
<CAK9Skq_-cidRHrbVNgJqoV3nYCxRNDO6vTifOJRUFKaWEZyzkw@mail.gmail.com>
Hi José,
Am 02.09.2014 um 09:53 schrieb Jose Paredes:
Show 8 quoted lines
> Is there any way to run "git submodule update" in multiple threads?
>
> The use case:
> -------------------
> "git submodule update" seems to be inefficient when running
> sequentially on a large .gitmodules file.
> Assuming a git forest with over 7K gits it takes hours to complete the
> update (running on Windows+Cygwin)

Wow, over 7000 submodules under Windows? I can imagine that a submodule update takes some time under these circumstances.

> If not supported, this feature could be a good candidate for "git
> submodule" enhancement.
> What is your opinion or advice?

Hmm, are we really sure parallel execution would be faster? I can imagine that "git fetch" could profit a lot from fetching more than one submodule at a time (assuming you are not fetching from the same upstream server), but I'm not so sure about submodule update. And things might also be rather different e.g. on Windows and Linux.

Could you do some benchmarks comparing "git submodule update" with a script that does something like:

   (cd <submodule>; git checkout <commit recorded in superproject>)&

for each changed submodule to see if we could gain anything from executing the update in parallel? (You should be able to extract which submodules must be checked out to what commit by doing e.g. "git diff --raw <start> <target> | grep ^:160000" and processing the output a bit further).

Previous: Jose Paredes
Message 2 of 2 in “git submodule, multi-threading the update process for large number of registered submodules”
  1. Jose ParedesSep 2, 2014
  2. Jens LehmannSep 2, 2014

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.