commit 1569c56d2b93873d833c0c6ef1d0cc475042367b from: Stefan Sperling via: Thomas Adam date: Tue May 31 23:14:47 2022 UTC reduce the amount of memory used for caching deltas during deltification With files sorted properly for deltification we produce better deltas but end up consuming more memory and risk running into OpenBSD ulimits during packing. To compensate, reduce the threshold for the amount of delta data we store in memory, spooling more deltas into the cache file. ok op@ commit - d23a6c95c554b90f2f8d0ecaeb09b73e4433576c commit + 1569c56d2b93873d833c0c6ef1d0cc475042367b blob - 70683bf242e8e041d19e21fdd6a8dd1eddc6421f blob + 85193d78da56d79a1b3218972933af866b15f376 --- lib/pack_create.c +++ lib/pack_create.c @@ -680,7 +680,7 @@ pick_deltas(struct got_pack_meta **meta, int nmeta, in off_t size, best_size; const int max_base_candidates = 3; size_t delta_memsize = 0; - const size_t max_delta_memsize = 25 * GOT_DELTA_RESULT_SIZE_CACHED_MAX; + const size_t max_delta_memsize = 4 * GOT_DELTA_RESULT_SIZE_CACHED_MAX; int outfd = -1; qsort(meta, nmeta, sizeof(struct got_pack_meta *), delta_order_cmp);