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

Improve zstd encoder and decoder usage in the compressor codec #419

Closed
bignacio opened this issue Jul 28, 2024 · 1 comment
Closed

Improve zstd encoder and decoder usage in the compressor codec #419

bignacio opened this issue Jul 28, 2024 · 1 comment

Comments

@bignacio
Copy link
Contributor

The ocf compressor codec creates a new zstd encoder and decoder for each call to Encode and Decode, which can results in a large number of memory allocations and impact to CPU usage.

The klauspost/compress library documents that encoders and decoders can be created once and reused many times after a reset, avoiding new allocations

@nrwiersma
Copy link
Member

Fixed by #420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants