Skip to content

Pull optimization: use klauspost compress/gzip instead of stdlib compress/gzip - #3753

Draft
Amy (amyxu-08) wants to merge 2 commits into
agent-substrate:mainfrom
amyxu-08:gzip-klauspost
Draft

Amy (amyxu-08) wants to merge 2 commits into
agent-substrate:mainfrom
amyxu-08:gzip-klauspost

Conversation

@amyxu-08

@amyxu-08 Amy (amyxu-08) commented Nov 10, 2026 •

Copy link
Copy Markdown

Part of the optimizations outlined in Investigating Substrate Image Pull Speed

go-containerregistry decompresses gzip layers with the stdlib, so readVerifiedLayer now decompresses layer.Compressed() itself with klauspost/compress, mirroring the code in go-containerregistry's Uncompressed (both go-containerregistry and readVerifiedLayer use klauspost/compress for zstd). This change is similar to how sandbox_assets.go and containerd use klauspost/compress/gzip for gzip layer decompression (issue, PR).

AI use: AI-assisted, I reviewed and tested it (go test -race -count=3 -shuffle=on ./internal/imagecache andhack/run-e2e.sh against dev cluster).

  • Tests pass
  • Docs updated (none applicable)

…paths in test

Change-Id: I2946604b81fd9e09cd128455ad15e3eb08f7038e
Signed-off-by: Amy Xu <amywxu@google.com>
@amyxu-08 Amy (amyxu-08) changed the title use klauspost gzip instead of stdlib, check gzip, zstd, and fallback … Pull Optimization: use klauspost compress/gzip instead of stdlib compress/gzip Nov 10, 2026
@amyxu-08 Amy (amyxu-08) changed the title Pull Optimization: use klauspost compress/gzip instead of stdlib compress/gzip Pull optimization: use klauspost compress/gzip instead of stdlib compress/gzip Nov 10, 2026
Change-Id: I8b324c6d9e61c602ac48fbf492b03f47a4ae74bd
Signed-off-by: Amy Xu <amywxu@google.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant