git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Lehmann <Jens.Lehmann@web.de>
To: Jose Paredes <jose.paredes.rios@gmail.com>, git@vger.kernel.org
Cc: Heiko Voigt <hvoigt@hvoigt.net>
Subject: Re: git submodule, multi-threading the update process for large number of registered submodules
Date: Tue, 02 Sep 2014 21:30:10 +0200	[thread overview]
Message-ID: <54061AC2.9020705@web.de> (raw)
In-Reply-To: <CAK9Skq_-cidRHrbVNgJqoV3nYCxRNDO6vTifOJRUFKaWEZyzkw@mail.gmail.com>

Hi José,

Am 02.09.2014 um 09:53 schrieb Jose Paredes:
> 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).

      reply	other threads:[~2014-09-02 19:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02  7:53 git submodule, multi-threading the update process for large number of registered submodules Jose Paredes
2014-09-02 19:30 ` Jens Lehmann [this message]

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=54061AC2.9020705@web.de \
    --to=jens.lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=hvoigt@hvoigt.net \
    --cc=jose.paredes.rios@gmail.com \
    /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).