From: Stefan Beller <sbeller@google.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, hvoigt@hvoigt.net, Jens.Lehmann@web.de,
Stefan Beller <sbeller@google.com>
Subject: [RFC/PATCH 0/4] parallel fetch for submodules
Date: Thu, 6 Aug 2015 10:35:20 -0700 [thread overview]
Message-ID: <1438882524-21215-1-git-send-email-sbeller@google.com> (raw)
When I was looking at the branches of Jens for work done on submodules
not yet upstream I found a commit "WIP threaded submodule fetching[1],
and I was side tracked wanting to present a different approach to that.
The first patch is a bit unrelated as it relates to the rewrite of git-submodule.sh
but also has code in submodule.c and the following patches modify code just around
that, so I did not remove that patch from this series. It is the same I sent
yesterday.
The next patch 2/4 presents a framework for parallel threaded work.
It allows to setup a worker pool of <n> threads and then have a queue
of tasks which are worked on by the threads. The patch is a the one which
I'd request most comments on as I think that can be reused in a variety of
situations (parallel checkout of files, parallel fetch of different remotes,
or such).
I consider the third patch farely boring as it adds argv_array_copy, so I
would not expect much discussion there.
The last patch 4/4 presents the new workdispatcher from 2/4 in use
with just one unsolved problem of how to handle the output of the
parallel commands to stdout and stderr. It may be useful to put
handling of parallel outputs into the work dispatcher.
[1] https://github.com/jlehmann/git-submod-enhancements/commit/47597753206d40e234a47392e258065c9489e2b3
This series applies on top of origin/sb/submodule-helper (d2c6c09ac819,
submodule: implement `module_list` as a builtin helper) and can also be found
at https://github.com/stefanbeller/git/tree/parallel-submodule-fetch
Stefan Beller (4):
submodule: implement `module_name` as a builtin helper
Add a workdispatcher to get work done in parallel
argv_array: add argv_array_clone to clone an existing argv array
submodule: add infrastructure to fetch submodules in parallel
Makefile | 1 +
argv-array.c | 13 ++++
argv-array.h | 1 +
builtin/fetch.c | 3 +-
builtin/submodule--helper.c | 23 ++++++
git-submodule.sh | 32 ++------
submodule.c | 92 ++++++++++++++++------
submodule.h | 3 +-
workdispatcher.c | 184 ++++++++++++++++++++++++++++++++++++++++++++
workdispatcher.h | 29 +++++++
10 files changed, 332 insertions(+), 49 deletions(-)
create mode 100644 workdispatcher.c
create mode 100644 workdispatcher.h
--
2.5.0.239.g9728e1d.dirty
next reply other threads:[~2015-08-06 17:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 17:35 Stefan Beller [this message]
2015-08-06 17:35 ` [PATCH 1/4] submodule: implement `module_name` as a builtin helper Stefan Beller
2015-08-06 19:49 ` Jens Lehmann
2015-08-06 19:54 ` Jens Lehmann
2015-08-06 17:35 ` [RFC PATCH 2/4] Add a workdispatcher to get work done in parallel Stefan Beller
2015-08-06 17:35 ` [PATCH 3/4] argv_array: add argv_array_copy Stefan Beller
2015-08-06 18:18 ` Eric Sunshine
2015-08-06 18:52 ` Jeff King
2015-08-06 17:35 ` [RFC PATCH 4/4] submodule: add infrastructure to fetch submodules in parallel Stefan Beller
2015-08-06 20:08 ` [RFC/PATCH 0/4] parallel fetch for submodules Jens Lehmann
2015-08-06 20:44 ` Stefan Beller
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=1438882524-21215-1-git-send-email-sbeller@google.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).