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

Re: [PATCH] Adding a cache of commit to patch-id pairs to speed up git-cherry

From
Jeff King <peff@peff.net>
Date
Jun 2, 2008, 06:42 UTC
Message-ID
<20080602064218.GA15144@sigill.intra.peff.net>
In-Reply-To
<alpine.DEB.1.00.0806020649110.13507@racer.site.net>
On Mon, Jun 02, 2008 at 07:13:14AM +0100, Johannes Schindelin wrote:
> I do not think that this "read-the-entire-table-into-memory" paradigm is a 
> wise choice. mmap()ing, I would have understood, but reading a potentially 
> pretty large table into memory?

When I was just a git-youth, I wrote a fast mmap-based cache for storing SHA1 pairs. It might give some direction. You should be able to find it here:

  http://mid.gmane.org/20060629035849.GA30749@coredump.intra.peff.net

It mmaps and binary searches a sorted list. New entries are added to an in-memory list, and then at the end of a run, the two sorted lists are merged to create the new on-disk version.

-Peff
Previous: Johannes SchindelinNext: Geoffrey Irving
Message 3 of 16 in “Adding a cache of commit to patch-id pairs to speed up git-cherry”
  1. Adding a cache of commit to patch-id pairs to speed up git-cherryGeoffrey Irving, Jun 2, 2008
  2. Johannes SchindelinJun 2, 2008
  3. Jeff KingJun 2, 2008
  4. Geoffrey IrvingJun 2, 2008
  5. Johannes SchindelinJun 2, 2008
  6. Geoffrey IrvingJun 2, 2008
  7. Shawn O. PearceJun 2, 2008
  8. Johannes SchindelinJun 2, 2008
  9. Geoffrey IrvingJun 2, 2008
  10. Johannes SchindelinJun 2, 2008
  11. Geoffrey IrvingJun 7, 2008
  12. Johannes SchindelinJun 8, 2008
  13. Geoffrey IrvingJun 2, 2008
  14. Johannes SchindelinJun 2, 2008
  15. Geoffrey IrvingJun 2, 2008
  16. Johannes SchindelinJun 2, 2008

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.