Re: [PATCH 02/13] refs: introduce `.ref` field for the base iterator
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Oct 7, 2025, 14:24 UTC
- Message-ID
- <CAOLa=ZR0KWkpB4kjFm2g8F-PK_LWpE20P21rmJGOLONCkfN7yA@mail.gmail.com>
- In-Reply-To
- <20251007-b4-pks-ref-filter-skip-parsing-objects-v1-2-916cc7c6886b@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 7 quoted lines
> 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