-
Notifications
You must be signed in to change notification settings - Fork 322
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
Refactor zstd Decoder #477
Comments
Currently the I'm not sure whether this belongs to this issue, if not I'm happy to create a new one |
@MarkusFreitag No. That would be a breaking change. Use IOReadCloser. It shouldn't be used like a standard ReadCloser, so I on purpose does not support the interface. |
# TLDR; * Streams can now be decoded without goroutines using `WithDecoderConcurrency(1)`. * `WithDecoderConcurrency(4)` is now default. If you need more concurrent `DecodeAll` operations, use `WithDecoderConcurrency(0)`. Goroutines exit when streams have finished reading (either error or EOF). Designed and tested to be compatible, but test before committing upgrade. # Changes Goroutines will now only be created on demand, and `WithDecoderConcurrency(1)` is now strictly synchronized. Decompression will typically be about 2x faster when using multiple goroutines, and will prepare input for the upstream reader async to reads. This can lead to ~3x faster input in total than using no goroutines. New default is now `WithDecoderConcurrency(4)` (or less, if GOMAXPROCS is less). Beyond 4, there is little benefit for streaming decompression. * No goroutines created, unless streaming, and auto-closed at error/EOF. * Synchronous stream decoding with `WithDecoderConcurrency(1)`. * Split sequence decoding/execution for streams up to 50% faster. * Simplified error flow. * Speedup on streams. * More consistent error reporting. * Improved error detection/compliance with reference decoder. * Improved test coverage. Fixes #477
Currently working on refactoring the zstandard decoder. Goals of the refactor:
The text was updated successfully, but these errors were encountered: