git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Shawn Pearce <spearce@spearce.org>
Cc: Daniel Stenberg <daniel@haxx.se>,
	Junio C Hamano <gitster@pobox.com>,
	Colby Ranger <cranger@google.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] Add persistent-https to contrib
Date: Thu, 24 May 2012 16:51:07 -0400	[thread overview]
Message-ID: <20120524205107.GA21329@sigill.intra.peff.net> (raw)
In-Reply-To: <CAJo=hJt4Suu5=kYh3kyOpDSPKr0jiZka=9g6U841PbiWCAQ_pQ@mail.gmail.com>

On Thu, May 24, 2012 at 01:46:36PM -0700, Shawn O. Pearce wrote:

> >> Nice numbers. And as clever as I find this helper-wrapping-a-helper
> >> solution, I wonder if the right layer for a fix isn't inside curl. It
> >> already keeps an ssl session-id cache in memory; how hard would it be to
> >> turn that into an on-disk cache?
> ...
> > Well, this helper "solution" also has the benefit of HTTP keep-alive
> > working across Git command invocations.

True. It also works even when the server does not support ssl id
caching.

> Here is plaintext HTTP, where the benefit is from HTTP keep-alive:
> 
>   (for i in {1..5}; do time git ls-remote
> http://android.googlesource.com/tools/repo >/dev/null;done) 2>&1  |
> grep real
>   real	0m0.098s
>   real	0m0.097s
>   real	0m0.106s
>   real	0m0.095s
>   real	0m0.105s
> 
>   (for i in {1..5}; do time git ls-remote
> persistent-http://android.googlesource.com/tools/repo >/dev/null;done)
> 2>&1  | grep real
>   real	0m0.134s
>   real	0m0.065s
>   real	0m0.063s
>   real	0m0.061s
>   real	0m0.067s
> 
> Notice we still save 30ms or so in this case. That is about the RTT
> for my workstation to that server. :-)

Nice. I assumed most of your speedup was coming from dropping the SSL
setup, but it seems that a good chunk of it is just the TCP setup.
Thanks for providing numbers.

-Peff

  reply	other threads:[~2012-05-24 20:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-23 17:06 [PATCH] Add persistent-https to contrib Colby Ranger
2012-05-24 18:17 ` Junio C Hamano
2012-05-24 19:33   ` Shawn Pearce
2012-05-24 20:29     ` Jeff King
2012-05-24 20:42       ` Shawn Pearce
2012-05-24 20:46         ` Shawn Pearce
2012-05-24 20:51           ` Jeff King [this message]
2012-05-24 20:42       ` Daniel Stenberg
2012-05-24 20:51     ` Junio C Hamano
2012-05-29 21:29       ` Colby Ranger
2012-05-29 21:52 ` [PATCH v2] " Colby Ranger
2012-05-29 23:34   ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120524205107.GA21329@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=cranger@google.com \
    --cc=daniel@haxx.se \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=spearce@spearce.org \
    /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).