Re: [PATCH 4/4] diff-lib: parallelize run_diff_files for submodules
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 24, 2022, 20:17 UTC
- Message-ID
- <xmqqsfkgr0ht.fsf@gitster.g>
- In-Reply-To
- <220923.86o7v64ik0.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 10 quoted lines
> On Thu, Sep 22 2022, Calvin Wan wrote: > >> +status.parallelSubmodules:: >> + When linkgit:git-status[1] is run in a superproject with >> + submodules, a status subprocess is spawned for every submodule. >> + This option specifies the number of submodule status subprocesses >> + to run in parallel. If unset, it defaults to 1. > > Why do we default to 1, instead of e.g. grep.threads defaulting to the > "cores available"?
I would imagine we would want to be able to say:
- I do not trust the parallel mode yet, just use the single process method that we have always been using.
- I do not know how many cores I have, just use a reasonable default parallelism.
- I want to use N processes because I know better than auto-scaling based on num_cpus.
And the value of 1 would be a reasonable way to express the first one.