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

Re: [External Mail]Re: why git is so slow for a tiny git push?

From
Jeff King <peff@peff.net>
Date
Oct 26, 2021, 21:54 UTC
Message-ID
<YXh5FoeyfePqr1k3@coredump.intra.peff.net>
In-Reply-To
<5063751fd4b94ccca3987080c96370d8@xiaomi.com>
On Thu, Oct 14, 2021 at 06:47:31AM +0000, 程洋 wrote:
> Seems that git receive-pack only takes 1 seconds.
> After that, git rev-list takes the most time, I don't know what is it doing

It's checking connectivity of what was sent (i.e., that the other side sent us all the objects). If you have a ton of refs on the server side, there are some known issues here, as just loading the "we already have this" side of the traversal can be very expensive.

There's been some recent work to make this faster, like f559d6d45e (revision: avoid hitting packfiles when commits are in commit-graph, 2021-08-09) and f45022dc2f (connected: do not sort input revisions, 2021-08-09), which will be in the upcoming release. I'm sure there are more improvements that could be made on top, but those show the general direction.

-Peff
Previous: 程洋Next: 程洋
Message 8 of 16 in “why git is so slow for a tiny git push?”
  1. 程洋Oct 9, 2021
  2. Jeff KingOct 11, 2021
  3. 程洋Oct 12, 2021
  4. Jeff KingOct 12, 2021
  5. 程洋Oct 12, 2021
  6. Jeff KingOct 12, 2021
  7. 程洋Oct 14, 2021
  8. Jeff KingOct 26, 2021
  9. 程洋Oct 27, 2021
  10. Ævar Arnfjörð BjarmasonOct 12, 2021
  11. Jeff KingOct 12, 2021
  12. 程洋Nov 23, 2021
  13. Jeff KingNov 24, 2021
  14. 程洋Nov 25, 2021
  15. 程洋Nov 24, 2021
  16. Han-Wen NienhuysOct 28, 2021

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.