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

Re: [RFC] super indexes to span multiple packfiles

From
Jon Smirl <jonsmirl@gmail.com>
Date
May 29, 2007, 16:05 UTC
Message-ID
<9e4733910705290905m66dd3081ubda9b92a707fc903@mail.gmail.com>
In-Reply-To
<20070529071622.GA8905@spearce.org>

Object's are not accessed in random order with git. Once an object reference hits a pack file it is very likely that following references will hit the same pack file. That's because you always find object SHA's by following the chains.

So first place to look for an object is the same place the previous object was found. If it isn't there order the search of the pack files by creation data (just a heuristic). Make this list a circle and start the search in the pack where the previous object was found. This can all be done with the existing indexes.

I haven't been reading all of the messages on this subject, but is this strategy enough to eliminate the need for a super index?

If you still need a super index, note that it may be good enough for it to only contain the SHA's for objects that are externally referenced. This index would be small and simply point to the correct pack file index to find the object in. You could add a list of dangling links to each packfile index to assist with building this super index.

My work with databases leads me to believe that figuring out how to pack everything into a smaller space always beats efforts put into incrementally improving the indexing scheme. Packing into a smaller space reduces the total IO needs and that's always a winner.

-- 
Jon Smirl
jonsmirl@gmail.com
Previous: Shawn O. PearceNext: Nicolas Pitre
Message 2 of 7 in “[RFC] super indexes to span multiple packfiles”
  1. Shawn O. PearceMay 29, 2007
  2. Jon SmirlMay 29, 2007
  3. Nicolas PitreMay 29, 2007
  4. Avi KivityMay 29, 2007
  5. Nicolas PitreMay 29, 2007
  6. Avi KivityMay 30, 2007
  7. Geert BoschMay 29, 2007

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.