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

Re: git clone: very long "resolving deltas" phase

From
Nicolas Pitre <nico@fluxnic.net>
Date
Apr 7, 2010, 14:40 UTC
Message-ID
<alpine.LFD.2.00.1004071022140.7232@xanadu.home>
In-Reply-To
<loom.20100407T112028-388@post.gmane.org>
On Wed, 7 Apr 2010, Marat Radchenko wrote:
Show 6 quoted lines
> Nicolas Pitre <nico <at> fluxnic.net> writes:
> > The "Resolving deltas" is performed locally, when Git is actually 
> > expanding all the deltas in the received pack to find the actual SHA1 of 
> > the resulting object in order to create the pack index.
> Is there any technical limitation why it cannot be done simultaniously with
> fetch (piped or whatever), instead of a separate step after fetch?

The non delta compressed objects are indexed simultaneously as they're received on the wire. However this is way suboptimal to do that for delta objects because

1) The base object needed to resolve a given delta object might not have 
   been received yet.  This means in this case that the delta will have 
   to be resolved later anyway, and finding out if a just received 
   object might be a base object for previously received objects is 
   rather costly, and even impossible if that potential base object is 
   itself a delta.  So it is best to figure out the delta dependencies 
   only once at the end of the transfer.
2) When resolving deep delta chains, it is best to start from the root 
   i.e. create the result from a delta object and resolve all deltas 
   with this result for base recursively, not to expand deltas 
   repeatedly which would turn this process into exponential CPU usage.  
   Again this can be done only when all delta objects have been 
   received.
Nicolas
Previous: Marat RadchenkoNext: Nicolas Pitre
Message 8 of 39 in “git clone: very long "resolving deltas" phase”
  1. Vitaly BerovApr 6, 2010
  2. Matthieu MoyApr 6, 2010
  3. Vitaly BerovApr 6, 2010
  4. VitalyApr 6, 2010
  5. Andreas EricssonApr 6, 2010
  6. Nicolas PitreApr 6, 2010
  7. Marat RadchenkoApr 7, 2010
  8. Nicolas PitreApr 7, 2010
  9. Nicolas PitreApr 6, 2010
  10. Nicolas PitreApr 6, 2010
  11. VitalyApr 7, 2010
  12. Nicolas PitreApr 7, 2010
  13. Vitaly BerovApr 9, 2010
  14. Matthieu MoyApr 9, 2010
  15. Nicolas PitreApr 9, 2010
  16. Vitaly BerovApr 10, 2010
  17. Nicolas PitreApr 9, 2010
  18. Vitaly BerovApr 10, 2010
  19. Vitaly BerovApr 10, 2010
  20. Nicolas PitreApr 11, 2010
  21. VitalyApr 12, 2010
  22. Vitaly BerovApr 6, 2010
  23. Nicolas PitreApr 6, 2010
  24. Vitaly BerovApr 7, 2010
  25. Ilari LiusvaaraApr 7, 2010
  26. VitalyApr 7, 2010
  27. Ilari LiusvaaraApr 7, 2010
  28. Jakub NarebskiApr 7, 2010
  29. Nicolas PitreApr 7, 2010
  30. VitalyApr 7, 2010
  31. Nicolas PitreApr 7, 2010
  32. Vitaly BerovApr 9, 2010
  33. Nicolas PitreApr 9, 2010
  34. Vitaly BerovApr 10, 2010
  35. Nicolas PitreApr 7, 2010
  36. Sverre RabbelierApr 7, 2010
  37. VitalyApr 7, 2010
  38. VitalyApr 7, 2010
  39. Nicolas PitreApr 7, 2010

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.