From: Derrick Stolee Date: Mon, 14 May 2018 12:50:03 GMT Subject: Re: [PATCH 0/4] a few mark_parents_uninteresting cleanups Message-ID: In-Reply-To: <20180511180029.GA11290@sigill.intra.peff.net> On 5/11/2018 2:00 PM, Jeff King wrote: > 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 This series looks good to me. I found Patch 3 hard to read in the diff, so I just looked at the final result and the new arrangement is very clear about how it should behave. Reviewed-by: Derrick Stolee