git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Jeff King <peff@peff.net>, Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Taylor Blau <me@ttaylorr.com>
Subject: Re: [PATCH] check_everything_connected: assume alternate ref tips are valid
Date: Mon, 1 Jul 2019 08:26:23 -0400	[thread overview]
Message-ID: <5c38cb79-bc04-db10-12b9-7e4f83f836c4@gmail.com> (raw)
In-Reply-To: <20190629075536.GB5080@sigill.intra.peff.net>

On 6/29/2019 3:55 AM, Jeff King wrote:
> On Fri, Jun 28, 2019 at 09:22:56AM -0700, Junio C Hamano wrote:
> 
>>>  	argv_array_push(&rev_list.args, "--quiet");
>>> +	argv_array_push(&rev_list.args, "--alternate-refs");
>>>  	if (opt->progress)
>>>  		argv_array_pushf(&rev_list.args, "--progress=%s",
>>>  				 _("Checking connectivity"));
>>
>> Quite honestly, I am very surprised that we did not do this.  The
>> idea of alternate object store, as well as reducing transfer cost by
>> advertising their tips as '.have' phony refs, is almost as old as
>> the pack protocol itself.
> 
> Yeah, as you note we are already telling the other side of the push
> "hey, we already have these objects". So we are almost always just
> walking over our own local objects in the connectivity check, which is
> silly.
> 
> I only did "clone --reference" in the perf test because it was the
> simplest, but a push to a server with alternates should be similarly
> improved. E.g., doing this in a clone of linux.git:
> 
>   git init --bare dst.git
>   echo '../../.git/objects' >dst.git/objects/info/alternates
>   time git push dst.git HEAD
> 
> goes from 40+ seconds to 100ms or so. Again, obviously that's the best
> case, but it should also improve the normal case of somebody pulling
> down "torvalds/linux.git" and pushing it back up to their own
> "peff/linux.git", too.
> 
> I don't have real-world numbers yet from GitHub, because we're not
> actually advertising .haves on push right now. All of the Git pieces are
> now in places to do so, but we still have to make some tweaks at our
> replication layer. But soon. :)

Exciting! Should improve the user's experience keeping their forks
updated!

-Stolee

      reply	other threads:[~2019-07-01 12:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28 10:11 [PATCH] check_everything_connected: assume alternate ref tips are valid Jeff King
2019-06-28 10:18 ` Jeff King
2019-06-28 12:51 ` Derrick Stolee
2019-06-29  7:43   ` Jeff King
2019-07-01 12:25     ` Derrick Stolee
2019-07-01 12:59       ` Jeff King
2019-07-01 13:17         ` Jeff King
2019-07-01 13:17           ` [PATCH 1/2] object-store.h: move for_each_alternate_ref() from transport.h Jeff King
2019-07-01 13:23             ` Derrick Stolee
2019-07-01 13:18           ` [PATCH v2 2/2] check_everything_connected: assume alternate ref tips are valid Jeff King
2019-07-03  9:12             ` SZEDER Gábor
2019-07-03 16:41               ` Jeff King
2019-07-03 16:46                 ` Junio C Hamano
2019-07-03 16:50                 ` SZEDER Gábor
2019-07-03 17:05                   ` Junio C Hamano
2019-07-01 17:02           ` [PATCH] " Taylor Blau
2019-07-02  5:29             ` Jeff King
2019-06-28 16:22 ` Junio C Hamano
2019-06-29  7:55   ` Jeff King
2019-07-01 12:26     ` Derrick Stolee [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=5c38cb79-bc04-db10-12b9-7e4f83f836c4@gmail.com \
    --to=stolee@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.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).