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

Re: Slow fetches of tags

From
Junio C Hamano <junkio@cox.net>
Date
May 24, 2006, 18:08 UTC
Message-ID
<7v64jv8fdx.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0605240947580.5623@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 5 quoted lines
> So the problem may be that we basically send a totally unnecessary list of 
> all the objects we have, when the other end really only cares about the 
> fact that we have the objects that the tags point to. Which we know we do, 
> but we didn't say so, because "git-fetch" didn't really mark them that 
> way.

I think this speculation is correct. We should be able to do better.

Show 7 quoted lines
> I almost suspect that we need to have a syntax where-by the local 
> fetch-list ends up doing
>
> 	"$tagname:$tagname:$sha1wehave"
>
> as the argument to fetch-pack, and then fetch-pack would be modified to 
> send those "$sha1wehave" objects early as "have" objects.
But this logic has to be a bit more involved.

A "have" object is not just has_sha1_file(), but it needs to be reachable from one of our tips we have already verified as complete, so either the caller of fetch-pack does the verification and give a verified $sha1wehave, or fetch-pack takes $sha1weseemtohave and does its own verification and then send it as one of the "have" objects (the issue is the same as the one in my previous message to Eric W. Biederman -- we trust only refs not just having a single object).

It might be useful to have a helper script you can give N object names and M refs (and/or --all flag to mean "all of the refs"), which returns the ones that are reachable from the given refs. It would be even more useful if it were a helper function, but given that the computation would involve walking the ancestry chain, I suspect it would have a bad interaction with any user of such a helper function that wants to do its own ancestry walking, because many of them seem to assume an object that has already been parsed are the ones they parsed for their own purpose.

Previous: Linus TorvaldsNext: Linus Torvalds
Message 4 of 23 in “Slow fetches of tags”
  1. Ralf BaechleMay 24, 2006
  2. Linus TorvaldsMay 24, 2006
  3. Linus TorvaldsMay 24, 2006
  4. Junio C HamanoMay 24, 2006
  5. Linus TorvaldsMay 24, 2006
  6. Linus TorvaldsMay 24, 2006
  7. Junio C HamanoMay 25, 2006
  8. Junio C HamanoMay 25, 2006
  9. Ralf BaechleMay 26, 2006
  10. upload-pack: stop "ack continue" when we know common commits for wanted refsJunio C Hamano, May 27, 2006
  11. Ralf BaechleMay 25, 2006
  12. Junio C HamanoJul 26, 2006
  13. Johannes SchindelinJul 28, 2006
  14. Teach the git wrapper about --name-rev and --name-rev-by-tagsJohannes Schindelin, Jul 28, 2006
  15. Junio C HamanoJul 28, 2006
  16. Linus TorvaldsJul 28, 2006
  17. Johannes SchindelinJul 28, 2006
  18. Nguyễn Thái Ngọc DuyJul 29, 2006
  19. Johannes SchindelinJul 29, 2006
  20. Junio C HamanoMay 24, 2006
  21. Ralf BaechleMay 24, 2006
  22. Junio C HamanoMay 24, 2006
  23. Ralf BaechleMay 25, 2006

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.