"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: convert delta cache to hash table
To:
Stefan Sperling <stsp@stsp.name>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 03 Jun 2022 11:45:12 +0200

Download raw body.

Thread
Stefan Sperling <stsp@stsp.name> wrote:
> This patch converts the delta cache from a linked list to a hash table.
> 
> got-read-pack and got-index-pack are now faster because the cache is
> more efficient and less time is spent decompressing small deltas over
> and over again.
> 
> The cache will now store a lot more deltas. To limit memory consumption
> only relatively small deltas are stored, up to 2048 bytes in size.
> This threshold seems to work well. The average delta size in OpenBSD
> src.git is about 1600 bytes (determined roughly by listing the largest
> pack file with 'gotadmin ls', adding up all the size values, and dividing
> this total size by the number of objects in the pack file).
> 
> We could tweak delta cache parameters in the future if we find the
> current settings to be suboptimal. Tweaking the global constants at
> the top of the file should be good enough for experimentation.
> The important effects to look for are time spent creating and/or
> indexing a pack file, and memory usage.
> 
> ok?

reads fine to me; ok op@