Re: [PATCH v2 05/38] refs: create a base class "ref_store" for files_ref_store
- From
Stefan Beller <stefanbeller@gmail.com>
- Date
- Sep 5, 2016, 05:17 UTC
- Message-ID
- <d04e8a6c-15c8-a39a-2200-ef20b0cd3a42@gmail.com>
- In-Reply-To
- <c6ae77bf-e2e2-c108-648d-75b5164b7ba2@alum.mit.edu>
On 04.09.2016 20:53, Michael Haggerty wrote:
Show 10 quoted lines
> On 09/04/2016 10:40 PM, David Turner wrote: >> On Sun, 2016-09-04 at 18:08 +0200, Michael Haggerty wrote: >> >>> +/* A linked list of ref_stores for submodules: */ >>> +static struct ref_store *submodule_ref_stores; >> >> I don't like the per-submodule stores being in a linked list, which >> requires a linear search. Stefan has, I think, been doing a bunch of >> work to scale git to support on the order of thousands of submodules, >> which this potentially breaks. What about a hashmap?
Well I did mostly usability up to this point, not efficiency in terms of fast execution.
Show 9 quoted lines
> > I agree it's not ideal, but this linked list is not new. Before this > patch the same code was in `files-backend.c`, and before patch [03/38] > essentially the same linked list was stored as `submodule_ref_caches`. > So this is not a regression, and I'd rather not address it in this patch > series. > > CC Stefan in case he'd like to put it on his radar. Honestly, I've never > checked how often the submodule reference cache is used in real life.
I think I need to spend some time on the data structures eventually.
Thanks for cc'ing
Stefan
> > Michael >