Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[perf] - Leverage pgzip for Parallel decompression #3149

Merged
merged 14 commits into from
Aug 2, 2024
Prev Previous commit
Next Next commit
use optimzied gzip
  • Loading branch information
ahrav committed Aug 2, 2024
commit d042e50ab680ee8136e5f597c9ce5a22096f7e44
7 changes: 6 additions & 1 deletion pkg/sources/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,12 @@ func (s *Source) processLayer(ctx context.Context, layer v1.Layer, imgInfo image
}
defer rc.Close()

gzipReader, err := gzip.NewReader(rc)
const (
defaultBlockSize = 1 << 24 // 16MB
defaultBlocks = 8
)

gzipReader, err := gzip.NewReaderN(rc, defaultBlockSize, defaultBlocks)
if err != nil {
return err
}
Expand Down
Loading