Subject: Re: [RFC PATCH 01/14] midx: use `string_list` for retained MIDX files

From: Taylor Blau <[email-masked]>
Date: Thu, 26 Feb 2026 22:02:44 -0500

On Thu, Feb 26, 2026 at 12:29:22PM -0800, Junio C Hamano wrote:
> > Replace the bare array with a `string_list` which can be passed around
> > as a single parameter. Though it improves lookup performance, the
> > difference is likely immeasurable given how small the keep_hashes array
> > typically is.
>
> And if it the lookup performance turns out to be an issue, we can
> switch to strmap or something more appropriate.

True. In practice these should have at most tens of entries, so I
suspect the string_list will be completely fine.

If we are cleaning up so many stale MIDX files that we need a more
efficient data structure just to keep track of those files, we likely
have far greater problems to worry about ;-).

Thanks,
Taylor