All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Lehmann <Jens.Lehmann@web.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: [PATCH] Add the --submodule-summary option to the diff option family
Date: Wed, 07 Oct 2009 21:32:54 +0200	[thread overview]
Message-ID: <4ACCECE6.1030508@web.de> (raw)
In-Reply-To: <7vocok21pw.fsf@alter.siamese.dyndns.org>

Junio C Hamano schrieb:
> Jens Lehmann <Jens.Lehmann@web.de> writes:
> 
>>> But I really, really, really want to avoid a fork() in the common case.  I 
>>> do have some users on Windows, and I do have a few submodules in that 
>>> project.  Having too many fork() calls there would just give Git a bad 
>>> reputation.  And it has enough of that, it does not need more.
>> Me too thinks performance matters here. We do have a repo at my dayjob
>> with more than a handful of submodules and its main target platform is
>> windows ... so having that perform nicely is a win for us.
> 
> Numbers?

Here they are:

First i did them with the repo at hand, current msysgit master with
Dscho's git-repo checked out:

  without fork : real	0m0.672s
  with fork    : real	0m0.781s

So here it's a about 16% slower when using fork() (and both are
generating about 7270 shortlog entries).

But i thought this to be a rather unusual situation, having only one
submodule being changed by 7270 commits ...

So i took a live repo from my dayjob containing 8 submodules. In each
submodule i did a "git checkout HEAD^" to simulate one change. And
then i got:

  without fork : real	0m0.203s
  with fork    : real	0m0.453s

This is a degradation of more than 120% because of the fork()s. And
just for fun i ran the scripted submodule summary too:

  scripted     : real	0m3.437s

So the forked version outperforms the scripted version by a factor of
7, while the speedup from Dscho's original proposal is almost 17fold.
(If i did my computations right, the extra costs for each changed
submodule are a bit more than 30ms when fork()ing. Dscho's version
doesn't seem to suffer from changed submodules at all, i measured
0.203s for both versions before i did the submodule init and update).

(Best of three, "time git diff --submodule-summary". My system is an
Athlon64x2 4600+ with WindowsXP)


Jens

  parent reply	other threads:[~2009-10-07 19:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1254668669u.git.johannes.schindelin@gmx.de>
2009-10-04 15:05 ` [PATCH] Add the --submodule-summary option to the diff option family Johannes Schindelin
2009-10-04 22:19   ` Junio C Hamano
2009-10-05  6:18     ` Johannes Sixt
2009-10-05  9:00       ` Johannes Schindelin
2009-10-05  9:09         ` Johannes Sixt
2009-10-05  9:20           ` Johannes Schindelin
     [not found]     ` <alpine.DEB.1.00.0910051027010.4985@pacific.mpi-cbg.de>
2009-10-05  9:21       ` Johannes Schindelin
2009-10-05 11:22       ` Jens Lehmann
2009-10-05 17:32         ` Jens Lehmann
2009-10-05 20:39           ` Johannes Schindelin
2009-10-05 19:08       ` Junio C Hamano
2009-10-05 21:08         ` Johannes Schindelin
2009-10-06 10:58           ` Jens Lehmann
2009-10-06 11:36             ` Junio C Hamano
2009-10-06 11:45               ` Johannes Schindelin
2009-10-06 11:51                 ` Jens Lehmann
2009-10-06 12:10                   ` Johannes Schindelin
2009-10-07 19:32               ` Jens Lehmann [this message]
2009-10-07 20:00                 ` Junio C Hamano
2009-10-07 22:28                   ` Johannes Schindelin

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=4ACCECE6.1030508@web.de \
    --to=jens.lehmann@web.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.