Re: [PATCH 2/6] pack-bitmap: prepare to read lookup table extension
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Jun 22, 2022, 21:34 UTC
- Message-ID
- <YrOK5wf/tvGSFbSH@nand.local>
- In-Reply-To
- <20220622171814.46313-1-chakrabortyabhradeep79@gmail.com>
On Wed, Jun 22, 2022 at 10:48:14PM +0530, Abhradeep Chakraborty wrote:
Show 6 quoted lines
> > Ahhh. Thanks for refreshing my memory. I wonder if you think there is a > > convenient way to work some of this into a short comment to help other > > readers in the future, too. > > Actually, Derrick has suggested to go with iterative approach[1] instead of > Recursive approach. What's your view on it?
I don't have a strong feeling about it. In practice, we seem to top out at ~500 bitmaps or so for large-ish repositories, so I would be surprised to see this result in stack exhaustion even in the worst case (every bitmap xor'd with the previous one, forming a long chain).
But it doesn't hurt to be defensive, so I think it's worth it as long as you don't find the implementation too complex.
> [1] https://lore.kernel.org/git/92dc6860-ff35-0989-5114-fe1e220ca10c@github.com/
Thanks, Taylor