Commit Diff
- Commit:
159a21e5a66248bba48b1b665ff4c2c3c61b2240
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
- Message:
- 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.
- Actions:
- Patch | Tree
--- lib/got_lib_repository.h +++ 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 {