Re: [PATCH] check_everything_connected: assume alternate ref tips are valid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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. :)

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux