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

Re: Balanced packing strategy

From
Petr Baudis <pasky@suse.cz>
Date
Nov 13, 2005, 11:00 UTC
Message-ID
<20051113110024.GM30496@pasky.or.cz>
In-Reply-To
<7vveyxcm3p.fsf@assigned-by-dhcp.cox.net>

Dear diary, on Sun, Nov 13, 2005 at 03:34:02AM CET, I got a letter where Junio C Hamano <junkio@cox.net> said that...

Show 8 quoted lines
> Craig Schlenter <craig@codefountain.com> writes:
> 
> > Does the pack index file contain enough information to enable a client
> > to send http byte range requests to grab individual objects from a pack?
> > It does seem to store object offsets...
> 
> Yes, it is certainly doable; there is enough information.  I am
> not sure if it is worth the complexity, though.
I think we need either the balanced packing or this.
Show 6 quoted lines
> Many objects are stored delitified, so your byte range requests
> would return delta and base object name.  After you read what
> was returned and find out the base object name, you would need
> to get it, which can be another delta against its base object.
> This would make tangling a delta chain would become a serialized
> sequence of requests.

Sort the objects topologically, then get everything from the old heads on. Obviously, this will not work so well when we get multiple heads in single pack, but either don't do that (would it be actually so bad if we would create one pack per head?), or:

  (i) objects are topologically sorted
  (ii) objects introduced by a commit/tree are right after the commit or
       tree in the pack file
  (iii) index file contains parents list for each commit

This way, you can possibly run through the gaps, or if the gap is big enough, restart the request. You still will miss objects introduced by commits in different branches, but in case of trees you can slurp the trees at once again, and pick the individual objects otherwise; while doing this second pass, you can apply the gaps strategy again.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
Previous: Junio C HamanoNext: Josef Weidendorfer
Message 16 of 18 in “Remove unneeded packs”
  1. Marcel HoltmannNov 12, 2005
  2. Andreas EricssonNov 12, 2005
  3. Marcel HoltmannNov 12, 2005
  4. Lukas SandströmNov 12, 2005
  5. Marcel HoltmannNov 12, 2005
  6. Junio C HamanoNov 13, 2005
  7. Lukas SandströmNov 13, 2005
  8. Sergey VlasovNov 13, 2005
  9. Lukas SandströmNov 13, 2005
  10. Sergey VlasovNov 13, 2005
  11. Lukas SandströmNov 13, 2005
  12. Craig SchlenterNov 12, 2005
  13. Balanced packing strategyPetr Baudis, Nov 12, 2005
  14. Craig SchlenterNov 12, 2005
  15. Junio C HamanoNov 13, 2005
  16. Petr BaudisNov 13, 2005
  17. Josef WeidendorferNov 13, 2005
  18. Junio C HamanoNov 13, 2005

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.