From: Junio C Hamano <gitster@pobox.com>
To: Brandon Casey <bcasey@nvidia.com>
Cc: Brandon Casey <drafnel@gmail.com>, Jeff King <peff@peff.net>,
"git\@vger.kernel.org" <git@vger.kernel.org>,
Martin Fick <mfick@codeaurora.org>
Subject: Re: [PATCH] remote.c: avoid O(n^2) behavior in match_push_refs by using string_list
Date: Wed, 03 Jul 2013 13:22:14 -0700 [thread overview]
Message-ID: <7v7gh7e6mh.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <51D479BA.1070207@nvidia.com> (Brandon Casey's message of "Wed, 3 Jul 2013 12:21:30 -0700")
Brandon Casey <bcasey@nvidia.com> writes:
>> ... by penalizing the common case by how much? If it is not too
>> much, then this obviously would be a good change.
>
> For something the size of the git repo, 5 branches, and pushing with
> matching refspecs, I can't measure any difference. The fastest time I
> record with or without this patch is the same:
>
> $ time git push -n
> real 0m0.178s
> user 0m0.020s
> sys 0m0.008s
>
> Ditto, when only pushing a single branch. Preparing the string list for
> a repo with a "normal" number of refs has very little overhead.
My repository git.git and Linus's kernel are not "normal". It did
not matter so far to have O(n*m) when pushing to our histories.
The case that matters is for somebody to be pushing one (or a few)
refs against a repository with many many refs, like pushing a review
request to Gerrit instance, which I think Martin has in mind.
next prev parent reply other threads:[~2013-07-03 20:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-02 23:53 [PATCH] remote.c: avoid O(n^2) behavior in match_push_refs by using string_list Brandon Casey
2013-07-03 6:23 ` Jeff King
2013-07-03 18:12 ` Brandon Casey
2013-07-03 18:40 ` Junio C Hamano
2013-07-03 19:00 ` Jeff King
2013-07-03 20:05 ` Brandon Casey
2013-07-03 19:21 ` Brandon Casey
2013-07-03 20:22 ` Junio C Hamano [this message]
2013-07-08 7:02 ` [PATCH v2] remote.c: avoid O(m*n) behavior in match_push_refs Brandon Casey
2013-07-08 7:50 ` Jeff King
2013-07-08 8:58 ` [PATCH v2 w/prune index] " Brandon Casey
2013-07-08 16:12 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v7gh7e6mh.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=bcasey@nvidia.com \
--cc=drafnel@gmail.com \
--cc=git@vger.kernel.org \
--cc=mfick@codeaurora.org \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).