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

[PATCH 0/4] a few mark_parents_uninteresting cleanups

From
Jeff King <peff@peff.net>
Date
May 11, 2018, 18:00 UTC
Message-ID
<20180511180029.GA11290@sigill.intra.peff.net>
This is a follow-up to the discussion from February:
  https://public-inbox.org/git/1519522496-73090-1-git-send-email-dstolee@microsoft.com/

There I theorized that some of these extra has_object_file() checks were unnecessary. After poking around a bit, I've convinced myself that this is the case, so here are some patches.

After Stolee's fix in ebbed3ba04 (revision.c: reduce object database queries, 2018-02-24), I doubt this will provide any noticeable speedup. IMHO the value is just in simplifying the logic.

The first two patches are the actual has_object_file simplifications. The second two are an attempt to fix some head-scratching I had while reading mark_parents_uninteresting(). I hope the result is easier to follow, but I may have just shuffled one confusion for another. :)

  [1/4]: mark_tree_contents_uninteresting(): drop missing object check
  [2/4]: mark_parents_uninteresting(): drop missing object check
  [3/4]: mark_parents_uninteresting(): replace list with stack
  [4/4]: mark_parents_uninteresting(): avoid most allocation
 revision.c | 90 ++++++++++++++++++++++++++++++------------------------
 1 file changed, 50 insertions(+), 40 deletions(-)
-Peff
Next: Jeff King
Message 1 of 11 in “a few mark_parents_uninteresting cleanups”
  1. 0/4 a few mark_parents_uninteresting cleanupsJeff King, May 11, 2018
  2. 1/4 mark_tree_contents_uninteresting(): drop missing object checkJeff King, May 11, 2018
  3. 2/4 mark_parents_uninteresting(): drop missing object checkJeff King, May 11, 2018
  4. Junio C HamanoMay 13, 2018
  5. 3/4 mark_parents_uninteresting(): replace list with stackJeff King, May 11, 2018
  6. 4/4 mark_parents_uninteresting(): avoid most allocationJeff King, May 11, 2018
  7. Derrick StoleeMay 14, 2018
  8. Jeff KingMay 14, 2018
  9. Derrick StoleeMay 14, 2018
  10. Jeff KingMay 14, 2018
  11. Derrick StoleeMay 14, 2018

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.