Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Cache uncompressed data section as well #98

Merged
merged 1 commit into from
Aug 19, 2023

Conversation

jonjohnsonjr
Copy link
Contributor

We spend ~half of our time decompressing the data section on rebuilds. This cuts that out when we have a cache hit, but this is also faster on a cache miss because we already have to decompress when we verify file checksums.

@jonjohnsonjr jonjohnsonjr marked this pull request as draft August 18, 2023 23:33
We spend ~half of our time decompressing the data section on rebuilds.
This cuts that out when we have a cache hit, but this is also faster on
a cache miss because we already have to decompress when we verify file
checksums.

Signed-off-by: Jon Johnson <jon.johnson@chainguard.dev>
@jonjohnsonjr
Copy link
Contributor Author

Measured go1.20 (unplugged, over wifi, YMMV):

Cold

Before

apko publish --arch amd64 --keyring-append  --repository-append     15.62s user 3.49s system 162% cpu 11.775 total

After

apko publish --arch amd64 --keyring-append  --repository-append     12.55s user 3.42s system 176% cpu 9.037 total

(11.775 -> 9.037 seconds)

Hot

Before

apko publish --arch amd64 --keyring-append  --repository-append     11.14s user 1.90s system 208% cpu 6.270 total

After

apko publish --arch amd64 --keyring-append  --repository-append     8.12s user 1.78s system 310% cpu 3.185 total

(6.270 -> 3.185 seconds)

@jonjohnsonjr jonjohnsonjr marked this pull request as ready for review August 18, 2023 23:54
@imjasonh imjasonh merged commit bec5668 into chainguard-dev:main Aug 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants