git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add persistent-https to contrib

From
Shawn Pearce <spearce@spearce.org>
Date
May 24, 2012, 20:42 UTC
Message-ID
<CAJo=hJsfRr7MKcmn8owuyYf7LJ2jzpqgCfkijQ6ahrZfz3CDpw@mail.gmail.com>
In-Reply-To
<20120524202930.GB18936@sigill.intra.peff.net>
On Thu, May 24, 2012 at 1:29 PM, Jeff King <peff@peff.net> wrote:
Show 21 quoted lines
> On Thu, May 24, 2012 at 12:33:08PM -0700, Shawn O. Pearce wrote:
>
>> $ (for i in {1..5}; do time git ls-remote
>> persistent-https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
>> >/dev/null;done) 2>&1 | grep real
>> real  0m0.208s
>> real  0m0.085s
>> real  0m0.079s
>> real  0m0.067s
>> real  0m0.059s
>
> 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?
>
> I don't think that is grounds for rejecting this patch; obviously it is
> working for you guys, and it is available right now, and it is only
> going into contrib/ anyway. But a curl solution seems like a cleaner
> long-term fix, and would benefit all curl users. It is even mentioned in
> curl's doc/TODO file. :)

Well, this helper "solution" also has the benefit of HTTP keep-alive working across Git command invocations. Its common for servers to use a 5 minute keep-alive on an HTTP 1.1 connection. Git-over-HTTP commonly uses Transfer-Encoding: chunked on replies, so keep-alive will generally just work, even though a pack stream's length isn't known in advance. Because the helper is an external process holding that connection open, we also benefit from being able to reuse an existing TCP connection to the server.

But sure, it would be nice if libcurl was able to share SSL sessions across Git command invocations without this black magic proxy thing.

Previous: Jeff KingNext: Shawn Pearce
Message 5 of 12 in “Add persistent-https to contrib”
  1. Add persistent-https to contribColby Ranger, May 23, 2012
  2. Junio C HamanoMay 24, 2012
  3. Shawn PearceMay 24, 2012
  4. Jeff KingMay 24, 2012
  5. Shawn PearceMay 24, 2012
  6. Shawn PearceMay 24, 2012
  7. Jeff KingMay 24, 2012
  8. Daniel StenbergMay 24, 2012
  9. Junio C HamanoMay 24, 2012
  10. Colby RangerMay 29, 2012
  11. Add persistent-https to contribColby Ranger, May 29, 2012
  12. Junio C HamanoMay 29, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.