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

Re: Commit cache to speed up rev-list and merge

From
Shawn Pearce <spearce@spearce.org>
Date
Sep 27, 2012, 15:51 UTC
Message-ID
<CAJo=hJtoqYEL5YiKawCt_SsSUqfCeYEQzY8Ntyb91cNfNS1w_Q@mail.gmail.com>
On Thu, Sep 27, 2012 at 5:17 AM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
> I'd like to see some sort of extension mechanism like in
> $GIT_DIR/index, so that we don't have to increase pack index version
> often. What I have in mind is optional commit cache to speed up
> rev-list and merge, which could be stored in pack index too.
Can you share some of your ideas?

In Linus' Linux kernel tree there are currently about 323,178 commits. If we store just the pre-parsed commit time as an int32 field this is an additional 1.2 MiB of data in the pack-*.idx file, assuming we can use additional data like pack offset position to correlate commit to the parsed int. If we stored parent pointers in a similar way you probably need at least 3.6 MiB of additional disk space on the index. For example, use 12 bytes for each commit to store enough of the parsed commit time to sort commits, and up to 2 parent pointers per commit.... with a reserved magic value for octopus merges to mean the commit itself has to be parsed to get the graph structure correct.

Next: Jeff King
Message 1 of 10 in “Re: Commit cache to speed up rev-list and merge”
  1. Shawn PearceSep 27, 2012
  2. Jeff KingSep 27, 2012
  3. Shawn PearceSep 27, 2012
  4. Jeff KingSep 27, 2012
  5. Nguyen Thai Ngoc DuySep 28, 2012
  6. Nguyen Thai Ngoc DuySep 28, 2012
  7. Shawn PearceOct 1, 2012
  8. Nguyen Thai Ngoc DuyOct 1, 2012
  9. Shawn PearceOct 1, 2012
  10. Nguyen Thai Ngoc DuyOct 1, 2012

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.