commit 533142c736712c1e29f7dc8ddf2e9d9f31ddef5af0dbb06ba9b7192f9ce88279 from: Stefan Sperling date: Tue Feb 24 14:58:50 2026 UTC stop using the pack delta cache in got-read-pack In got-read-pack the delta cache slows us down while enumerating objects during "gotadmin pack". Presumably due to the random access patterns[*], the delta cache is ineffective, with a cache hit rate of 4% or less. My attempts to improve this have failed. Until someone can figure out a way to make the delta cache useful for got-read-pack, let's disable it. The equivalent in gotd, repo_read.c, is not using the pack delta cache either. [*]The delta cache is very effective in got-index-pack where we run through deltas stored in the pack file sequentially. commit - 66a76ba7a7dfb72f1674f0dcd9f78c2463d49619b7a1876396d090e27590aa4d commit + 533142c736712c1e29f7dc8ddf2e9d9f31ddef5af0dbb06ba9b7192f9ce88279 blob - 2079ea5c128648b4db25b94f5b66ebe11bd5baa75c576421d4beb5a702f2c92d blob + c850ec3fc83e0d4a35206e684818b07b9ba3458ad718d71d34cd5b99c7e8f59a --- libexec/got-read-pack/got-read-pack.c +++ libexec/got-read-pack/got-read-pack.c @@ -1992,10 +1992,6 @@ receive_pack(struct got_pack **packp, struct imsgbuf * goto done; } - err = got_delta_cache_alloc(&pack->delta_cache); - if (err) - goto done; - #ifndef GOT_PACK_NO_MMAP if (pack->filesize > 0 && pack->filesize <= SIZE_MAX) { pack->map = mmap(NULL, pack->filesize, PROT_READ, MAP_PRIVATE,