From: Stefan Beller <sbeller@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jens Lehmann <Jens.Lehmann@web.de>,
Heiko Voigt <hvoigt@hvoigt.net>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH] submodule: implement `module_name` as a builtin helper
Date: Fri, 7 Aug 2015 16:19:25 -0700 [thread overview]
Message-ID: <CAGZ79kaGe59=z4Eeuno8DRuWWRD12OyLETi7NA+utfoLsJ4+=A@mail.gmail.com> (raw)
In-Reply-To: <xmqqpp2ywwj1.fsf@gitster.dls.corp.google.com>
On Fri, Aug 7, 2015 at 3:42 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Stefan Beller <sbeller@google.com> writes:
>
>> That's why I want to be a bit more generic and have this thread pool API
>> done in C, such that "any for loop" in git can be easily replaced by using
>> the thread pool. I think of "git fetch --all" specially.
>
> One more thing, as I didn't notice that you kept repeating "thread"
> pool API.
Yeah I intended to use both threads and processes for the heavy submodule
operations.
Each thread in the thread pool would setup the right argument lists
and environment
and then spawn a process for heavy weight operations, wait for the process,
maybe process its output.
Maybe I should omit the whole thread pool and only use select from a single
threaded main program.
>
> While I doubt that you would gain much by using threads in place of
> processes to perform parallel "submodule update", "submodule clone",
> "fetch all", etc., all of which are fairly well isolated and heavy
> weight operations themselves, and I suspect that the implementation
> simplicity of using separate processes would probably be huge plus
> compared to any possible upside you may gain from using threads, if
> you really want to go the "thread" route, the first thing to try
> would be to see if a few places we already use threads for
> parallelism (namely, "grep", "pack-objects", "preload-index" and
> "index-pack") can be factored out and model your new API around the
> commonality among them.
next prev parent reply other threads:[~2015-08-07 23:19 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-05 0:04 [PATCH 1/4] submodule: implement `module_list` as a builtin helper Stefan Beller
2015-08-05 0:04 ` [PATCH 2/4] submodule: implement `module_name` " Stefan Beller
2015-08-05 0:05 ` Stefan Beller
2015-08-05 0:58 ` Eric Sunshine
2015-08-05 16:29 ` Stefan Beller
2015-08-05 19:06 ` Jens Lehmann
2015-08-05 19:55 ` Stefan Beller
2015-08-05 21:08 ` [PATCH] " Stefan Beller
2015-08-06 19:49 ` Jens Lehmann
2015-08-06 21:38 ` Stefan Beller
2015-08-07 20:03 ` Junio C Hamano
2015-08-07 20:54 ` Stefan Beller
2015-08-07 20:17 ` Junio C Hamano
2015-08-07 20:49 ` Stefan Beller
2015-08-07 21:14 ` Junio C Hamano
2015-08-07 21:21 ` Stefan Beller
2015-08-07 21:32 ` Junio C Hamano
2015-08-07 22:04 ` Stefan Beller
2015-08-07 22:18 ` Junio C Hamano
2015-08-07 23:12 ` Stefan Beller
2015-08-07 22:42 ` Junio C Hamano
2015-08-07 23:19 ` Stefan Beller [this message]
2015-08-08 0:21 ` Junio C Hamano
2015-08-08 6:20 ` Junio C Hamano
2015-08-10 17:03 ` Stefan Beller
2015-08-05 18:31 ` [PATCH 1/4] submodule: implement `module_list` " Jens Lehmann
2015-08-07 19:53 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGZ79kaGe59=z4Eeuno8DRuWWRD12OyLETi7NA+utfoLsJ4+=A@mail.gmail.com' \
--to=sbeller@google.com \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=hvoigt@hvoigt.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).