From: Karthik Nayak Date: Tue, 07 Oct 2025 14:24:01 GMT Subject: Re: [PATCH 02/13] refs: introduce `.ref` field for the base iterator Message-ID: In-Reply-To: <20251007-b4-pks-ref-filter-skip-parsing-objects-v1-2-916cc7c6886b@pks.im> Patrick Steinhardt writes: > The base iterator has a couple of fields that tracks the name, target, > object ID and flags for the current reference. Due do this design we > have to create a new `struct reference` whenever we want to hand over > that reference to the callback function, which is tedious and not very > efficient. > > Convert the structure to instead contain a `stuct reference` as member. s/stuct/struct > This member is expected to be populated by the implementations of the > iterator and is handed over to the callback directly. > Wouldn't this also add the burden on each backend to ensure we don't serve stale data for each '_advance()' call? Would it make sense to reset this data in `ref_iterator_advance()`? Karthik