From: Martin Fick <mfick@codeaurora.org>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 0/3] avoid quadratic behavior in fetch-pack
Date: Tue, 2 Jul 2013 11:45:07 -0600 [thread overview]
Message-ID: <201307021145.07726.mfick@codeaurora.org> (raw)
In-Reply-To: <20130702061149.GB1206@sigill.intra.peff.net>
On Tuesday, July 02, 2013 12:11:49 am Jeff King wrote:
> Here are my patches to deal with Martin's pathological
> case, split out for easy reading. I took a few timings
> to show that the results of the 3rd patch are noticeable
> even with 50,000 unique refs (which is still a lot, but
> something that I could conceive of a busy repo
> accumulating over time).
>
> [1/3]: fetch-pack: avoid quadratic list insertion in
> mark_complete [2/3]: commit.c: make
> compare_commits_by_commit_date global [3/3]: fetch-pack:
> avoid quadratic behavior in rev_list_push
>
> And here's the diffstat to prove it is really not scary.
> :)
>
> commit.c | 2 +-
> commit.h | 2 ++
> fetch-pack.c | 16 ++++++++--------
> 3 files changed, 11 insertions(+), 9 deletions(-)
>
> -Peff
I applied these 3 patches and it indeed improves things
dramatically. Thanks Peff, you are awesome!!!
The synthetic test case (but sorted), now comes in at around
15s. The more important real world case (for us), fetching
from my production server, which took around 12mins
previously, now takes around 30s (I think the extra time is
now spent on the Gerrit server, but I will investigate that
a bit more)! That is very significant and should make many
workflows much more efficient. +1 for merging this. :)
Again, thanks,
-Martin
Note, I tested git-next 1.8.3.2.883.g27cfd27 to be sure that
it is still problematic without this patch, it is (running
for 10mins now without completing).
--
The Qualcomm Innovation Center, Inc. is a member of Code
Aurora Forum, hosted by The Linux Foundation
next prev parent reply other threads:[~2013-07-02 17:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-02 3:02 How to still kill git fetch with too many refs Martin Fick
2013-07-02 4:07 ` Jeff King
2013-07-02 4:41 ` Jeff King
2013-07-02 5:01 ` Jeff King
2013-07-02 5:19 ` Junio C Hamano
2013-07-02 5:28 ` Jeff King
2013-07-02 6:11 ` [PATCH 0/3] avoid quadratic behavior in fetch-pack Jeff King
2013-07-02 6:16 ` [PATCH 1/3] fetch-pack: avoid quadratic list insertion in mark_complete Jeff King
2013-07-02 6:21 ` [PATCH 2/3] commit.c: make compare_commits_by_commit_date global Jeff King
2013-07-02 6:24 ` [PATCH 3/3] fetch-pack: avoid quadratic behavior in rev_list_push Jeff King
2013-07-02 7:52 ` Eric Sunshine
2013-07-02 17:45 ` Martin Fick [this message]
2013-07-02 17:52 ` How to still kill git fetch with too many refs Brandon Casey
2013-07-02 9:24 ` Michael Haggerty
2013-07-02 16:58 ` Martin Fick
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=201307021145.07726.mfick@codeaurora.org \
--to=mfick@codeaurora.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.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).