summaryrefslogtreecommitdiff
path: root/refs/ref-cache.h
diff options
context:
space:
mode:
authorLibravatar Michael Haggerty <mhagger@alum.mit.edu>2017-09-25 10:00:15 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-09-25 18:02:46 +0900
commit9dd389f3d8d220d764beaca7237ac33de5de81c7 (patch)
treed01ba487af7daf60b7376a22303675cc5557a3d1 /refs/ref-cache.h
parentref_store: implement `refs_peel_ref()` generically (diff)
downloadtgif-9dd389f3d8d220d764beaca7237ac33de5de81c7.tar.xz
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>
Diffstat (limited to 'refs/ref-cache.h')
0 files changed, 0 insertions, 0 deletions