packed_ref_store: get rid of the `ref_cache` entirely
commit9dd389f3d8d220d764beaca7237ac33de5de81c7
authorMichael Haggerty <mhagger@alum.mit.edu>
Mon, 25 Sep 2017 08:00:15 +0000 (25 10:00 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Sep 2017 09:02:46 +0000 (25 18:02 +0900)
treed01ba487af7daf60b7376a22303675cc5557a3d1
parentba1c052fa616eb93a654375e8b9d59daa47c28a8
packed_ref_store: get rid of the `ref_cache` entirely

Now that everything has been changed to read what it needs directly
out of the `packed-refs` file, `packed_ref_store` doesn't need to
maintain a `ref_cache` at all. So get rid of it.

First of all, this will save a lot of memory and lots of little
allocations. Instead of needing to store complicated parsed data
structures in memory, we just mmap the file (potentially sharing
memory with other processes) and parse only what we need.

Moreover, since the mmapped access to the file reads only the parts of
the file that it needs, this might save reading all of the data from
disk at all (at least if the file starts out sorted).

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/packed-backend.c