Re: [PATCH 05/22] read-cache: add index reading api
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 8, 2013, 23:09 UTC
- Message-ID
- <7vk3l0y7hk.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <874nc4rewd.fsf@gmail.com>
Thomas Gummerer <t.gummerer@gmail.com> writes:
Show 7 quoted lines
>> The reader often needs to rewind the read-pointer partially while >> walking the index (e.g. next_cache_entry() in unpack-trees.c and how >> the o->cache_bottom position is used throughout the subsystem). I >> am not sure if this singly-linked list is a good way to go. > > I'm not very familiar with the unpack-trees code, but from a quick look > the pointer (or position in the cache) is always only moved forward.
I am more worried about o->cache_bottom processing, where it currently is an index into an array.
With your ce->next_in_list_of_read_entries change, a natural rewrite would be to point at the ce with o->cache_bottom, but then that would mean you cannot in-place replace the entries like we used to be able to in an array based implementation.
But your series does not seem to touch unpack-trees yet, so I may be worried too much before it becomes necessary.