From: "Shawn O. Pearce" <spearce@spearce.org>
To: Julian Phillips <julian@quantumfyre.co.uk>
Cc: git@vger.kernel.org
Subject: Re: [RFC] Speeding up a null fetch
Date: Sun, 11 Feb 2007 18:52:18 -0500 [thread overview]
Message-ID: <20070211235218.GH31488@spearce.org> (raw)
In-Reply-To: <200702112332.14698.julian@quantumfyre.co.uk>
Julian Phillips <julian@quantumfyre.co.uk> wrote:
> Investigation showed that the main culprit seemed to be show-ref
> having to build a sorted list of all refs for every ref that was being
> checked. So I used the patch below to reduce this to a single call to
> show-ref (unless the ref had been updated). With this patch the fetch
> timed dropped to just under 1m - obviously quite a lot faster (better
> than I expected in fact).
Have a look at the `pu` branch in git.git. Junio has done some
work in this area to handle 1000 refs better:
...
commit 58fef67cb067b6dee8f94b7b0e0c1a2d324e3505
Author: Junio C Hamano <junkio@cox.net>
Date: Tue Jan 16 02:31:36 2007 -0800
git-fetch: rewrite another shell loop in C
Move another shell loop that canonicalizes the list of refs for
underlying git-fetch-pack and fetch-native-store into C.
This seems to shave the runtime for the same 1000 branch
repository from 30 seconds down to 15 seconds (it used to be 2
and half minutes with the original version).
Signed-off-by: Junio C Hamano <junkio@cox.net>
commit 3fc3729cd08e9d40dad54ccdd4db53900eca197b
Author: Junio C Hamano <junkio@cox.net>
Date: Tue Jan 16 01:53:29 2007 -0800
git-fetch: move more code into C.
This adds "native-store" subcommand to git-fetch--tool to
move a huge loop implemented in shell into C. This shaves about
70% of the runtime to fetch and update 1000 tracking branches
with a single fetch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
...
> However, this seems more band-aid than fix, and I wondered if someone
> more familiar with the git internals could point me in the right
> direction for a better fix, e.g. should I look at rewriting fetch in C?
Rewriting fetch in C is a lot of work, not just in developing it,
but in testing that all existing functionality is preserved and no
new bugs are introduced. Rewriting some of the performance critical
parts perhaps makes sense. Rewriting them in Python doesn't, as
we no longer have any Python dependency, and would like to keep it
that way (actuallly, some folks are also trying to remove the Perl
dependency from some of our critical tools).
--
Shawn.
next prev parent reply other threads:[~2007-02-11 23:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-11 23:32 [RFC] Speeding up a null fetch Julian Phillips
2007-02-11 23:49 ` Johannes Schindelin
2007-02-12 0:14 ` Julian Phillips
2007-02-11 23:52 ` Shawn O. Pearce [this message]
2007-02-12 0:18 ` Julian Phillips
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=20070211235218.GH31488@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=julian@quantumfyre.co.uk \
/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