Re: [PATCH v2 7/7] reftable/reader: add comments to `table_iter_next()`
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Feb 13, 2024, 06:57 UTC
- Message-ID
- <ZcsSz3rJIsK_HFzj@tanuki>
- In-Reply-To
- <xmqq4jed7g87.fsf@gitster.g>
On Mon, Feb 12, 2024 at 09:19:20AM -0800, Junio C Hamano wrote:
Show 18 quoted lines
> Patrick Steinhardt <ps@pks.im> writes: > > > While working on the optimizations in the preceding patches I stumbled > > upon `table_iter_next()` multiple times. It is quite easy to miss the > > fact that we don't call `table_iter_next_in_block()` twice, but that the > > second call is in fact `table_iter_next_block()`. > > > > Add comments to explain what exactly is going on here to make things > > more obvious. While at it, touch up the code to conform to our code > > style better. > > > > Note that one of the refactorings merges two conditional blocks into > > one. Before, we had the following code: > > > > ``` > > err = table_iter_next_block(&next, ti > > ");"???
Oh, right, seems to be a copy-paste error. I see you already fixed it in ps/reftable-iteration-perf and merged the branch to next. Thanks!
Patrick