Re: [PATCH/RFC 3/6] commit-reach: terminate merge-base walk when one paint side is exhausted
- From
Kristofer Karlsson <krka@spotify.com>
- Date
- Jun 22, 2026, 19:19 UTC
- Message-ID
- <CAL71e4NJZ9c_=0W4djRFCYPw4z_dkh_ZHEDWBk8cuwXhxT9jgw@mail.gmail.com>
- In-Reply-To
- <5c43f6ce-4dfe-47dd-b96a-80de57ecf108@gmail.com>
On Mon, 22 Jun 2026 at 20:12, Derrick Stolee <stolee@gmail.com> wrote:
Show 6 quoted lines
> > + if (generation < GENERATION_NUMBER_INFINITY && > > + queue.pending_merge_bases == 0 && > > + (queue.p1_count == 0 || queue.p2_count == 0)) > > + break; > I mentioned it earlier, but I think this check should be in the > dequeueing method instead of in the tail of the loop.
Yes, I will try to fold this one into the paint_queue_get as well.
Show 6 quoted lines
> I like that you broke this out into its own patch to demonstrate > that this is the key performance boost. It may be good to have > some performance test numbers that demonstrate that patch 2 does > not add any substantial overhead (timing should match previous > code) and in patch 3 this single condition gets us a huge benefit, > though it requires the data tracking of patch 2 to work.
Good point, I will try to run enough local tests to ensure that patch 2 does not add too much overhead to slow things down. I think I may need to create some type of (temporary, internal) test runner that runs the same walk multiple times to reduce the noise from parsing commits. I am not sure if I should also commit such a performance test or simply include a brief summary in the commit message
Thanks, Kristofer