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

Re: [PATCH] promisor-remote: add promisor.quiet configuration option

From
Jeff King <peff@peff.net>
Date
May 29, 2024, 09:36 UTC
Message-ID
<20240529093643.GE1098944@coredump.intra.peff.net>
In-Reply-To
<1b10454e-c5ad-4ce3-a724-27306ee8824c@compton.nu>
On Sat, May 25, 2024 at 11:29:13AM +0100, Tom Hughes wrote:
Show 17 quoted lines
> > I'm not at all opposed to providing a way to suppress this, but I feel
> > like in the long run, the more fundamental issue is that git-blame kicks
> > off a zillion fetches as it traverses. That's not only ugly but it's
> > also horribly inefficient.
> 
> This is true. One thing I found that makes things a lot more
> efficient if you're using ssh as the transport is to enable
> persistent multiplexing in .ssh/config with something like:
> 
> Host git.example.com
>   ControlMaster auto
>   ControlPath /run/user/%i/ssh/control.%C
>   ControlPersist 1m
>   SendEnv GIT_PROTOCOL
> 
> which avoids each fetch having to setup and authenticate a
> new ssh session.

Good point. That is sort of the opposite approach of my suggestion. That is, I was suggesting that git-blame batch everything to make a single efficient request. But if we could reduce the cost of making individual requests, then we wouldn't need to batch (which is quite a lot simpler).

The ssh session is going to be one source of latency and overhead. But just spawning the fetch and remote upload-pack are another (especially if you have to authenticate, and especially with the v2 protocol, which has an extra round-trip for capabilities upgrade).

If there was a long-running mode to git-fetch where it kept open a v2 session to the server and just said "hey, send me object X" and then "OK, now send me object Y" that would eliminate all of that overhead (and even for http, under the hood curl is good at keeping the session open between requests).

You'd still have some extra latency (while you're talking to the server, the local blame process is paused), but I suspect it would be a lot more tolerable.

And now your progress question is re-opened again. You might want a more succinct progress for something like blame that still does all of its fetching before generating output. E.g., you might want a single progress line with the current state (fetching or not), the count of fetched objects, the speed, and so on. And for something like "git log -p", where the progress would be interspersed with actual output, you might want to suppress it entirely.

So yeah, I have no real objection to what your patch is doing. Depending on how future work unfolds it might be more or less useful than it is now, but even in the worst case it probably won't be a bad thing to have in our toolbox.

-Peff
Previous: Tom Hughes
Message 10 of 10 in “promisor-remote: add promisor.quiet configuration option”
  1. promisor-remote: add promisor.quiet configuration optionTom Hughes, May 23, 2024
  2. Junio C HamanoMay 23, 2024
  3. Tom HughesMay 24, 2024
  4. promisor-remote: add promisor.quiet configuration optionTom Hughes, May 24, 2024
  5. Junio C HamanoMay 24, 2024
  6. Tom HughesMay 25, 2024
  7. promisor-remote: add promisor.quiet configuration optionTom Hughes, May 25, 2024
  8. Jeff KingMay 25, 2024
  9. Tom HughesMay 25, 2024
  10. Jeff KingMay 29, 2024

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.