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

Re: [PATCH] Enable parallelism in git submodule update.

From
Phil Hord <phil.hord@gmail.com>
Date
Nov 3, 2012, 18:44 UTC
Message-ID
<CABURp0pkv714k_+S2seTtdHMNJFzkgijYuNuWcfNvnF+c21cDg@mail.gmail.com>
In-Reply-To
<50953B52.3070107@web.de>
On Sat, Nov 3, 2012 at 11:42 AM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
Show 13 quoted lines
> Am 30.10.2012 19:11, schrieb Stefan Zager:
>> This is a refresh of a conversation from a couple of months ago.
>>
>> I didn't try to implement all the desired features (e.g., smart logic
>> for passing a -j parameter to recursive submodule invocations), but I
>> did address the one issue that Junio insisted on: the code makes a
>> best effort to detect whether xargs supports parallel execution on the
>> host platform, and if it doesn't, then it prints a warning and falls
>> back to serial execution.
>
> I suspect not passing on --jobs recursively like you do here is the
> right thing to do, as that would give exponential growth of jobs with
> recursion depth, which makes no sense to me.

On the other hand, since $jobs is still defined when the recursive call to is made to 'eval cmd_update "$orig_flags"', I suspect the value *is* passed down recursively. Maybe $jobs should be manually reset before recursing -- unless it is "0" -- though I expect someone would feel differently if she had one submodule on level 1 and 10 submodules on level 2. She would be surprised, then, when --jobs=10 seemed to have little affect on performance. So maybe it is best to leave it as it is, excepting that the apparent attempt not to pass the switch down is probably misleading.

Phil
Previous: Jens LehmannNext: Jens Lehmann
Message 5 of 6 in “Enable parallelism in git submodule update.”
  1. Enable parallelism in git submodule update.szager@google.com, Oct 30, 2012
  2. Stefan ZagerOct 30, 2012
  3. Stefan ZagerNov 2, 2012
  4. Jens LehmannNov 3, 2012
  5. Phil HordNov 3, 2012
  6. Jens LehmannNov 3, 2012

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.