increase pack index cache size from 16 to 64 to improve performance This can make a huge difference on repositories which contain more than 16 pack files, at the expense of additional open file handles. My test case was a ports.git repository with > 60 pack files (these accumulate due to 'got fetch', and 'git repack -a' would condense them). With cache size 16 'got update' in /usr/ports took more than 60 seconds. With cache size 64 the same command took less than 5 seconds. The root cause is probably that mapping and unmapping large files over and over again is expensive on OpenBSD.
diff --git a/lib/got_lib_repository.h b/lib/got_lib_repository.h
index 18d2953..926534b 100644
--- a/lib/got_lib_repository.h
+++ b/lib/got_lib_repository.h
@@ -28,7 +28,7 @@
#define GOT_OBJECTS_PACK_DIR "objects/pack"
#define GOT_PACKED_REFS_FILE "packed-refs"
-#define GOT_PACKIDX_CACHE_SIZE 16
+#define GOT_PACKIDX_CACHE_SIZE 64
#define GOT_PACK_CACHE_SIZE GOT_PACKIDX_CACHE_SIZE
struct got_repository {