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

Re: rs/commit-list-sort-in-batch

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 9, 2012, 19:46 UTC
Message-ID
<7vty0svgb9.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120407073232.GA13076@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I'm not sure if that vindicates the patches, or implies that these
> things are lurking everywhere and that we should really move to a better
> data structure so we don't have to fix them all manually. :)
;-).

I do not know offhand how widespread the assumption of "list"-ness of the commit_list is in the codebase. The last time I looked at it was when I was wondering if we could give a custom allocator to "struct commit_list", as we seemed to liberally malloc()/free() quite many of them, with the hope to reduce memory footprint, but I didn't finish it, so...

But at least inside revision walking machinery, your earlier heap based implementation to optimize for time based priority queue access pattern looked a very sensible approach to me.

Previous: Jeff King
Message 4 of 4 in “What's cooking in git.git (Apr 2012, #03; Fri, 6)”
  1. Junio C HamanoApr 6, 2012
  2. rs/commit-list-sort-in-batchJeff King, Apr 7, 2012
  3. Jeff KingApr 7, 2012
  4. Junio C HamanoApr 9, 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.