On Sat, Mar 29, 2025 at 4:09 PM Melanie Plageman <melanieplage...@gmail.com> wrote: > > One alternative is to loop through the array of BlockInfoRecords and > get the start and end positions of the blocks in the arary for a > single relation/fork combo. Then we could make the read stream and > pass those two positions and the array as callback_private_data. That > would mean we loop through the whole array twice, but I wonder if the > improvement in clarity is worth it?
An alternative to this alternative is to somehow include the length of each "span" (BlockInfoRecords from a single relation/fork) in the first BlockInfoRecord of that span when building the array. Dunno how hard that would be, but then you wouldn't have to loop through it twice. - Melanie