File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,16 +31,6 @@ var encoderOptions = []zstd.EOption{
3131 // The default zstd window size is 8MB, which is much larger than the
3232 // typical RPC message and wastes a bunch of memory.
3333 zstd .WithWindowSize (512 * 1024 ),
34- // By default zstd uses GOMAXPROCS (64 in prod) threads to encode a
35- // given input, which is overkill for a typical RPC message and
36- // further wastes memory.
37- zstd .WithEncoderConcurrency (1 ),
38- }
39-
40- var decoderOptions = []zstd.DOption {
41- // Similar, zstd uses GOMAXPROCS threads for decoding, which is
42- // overkill.
43- zstd .WithDecoderConcurrency (1 ),
4434}
4535
4636type compressor struct {
@@ -50,7 +40,7 @@ type compressor struct {
5040
5141func init () {
5242 enc , _ := zstd .NewWriter (nil , encoderOptions ... )
53- dec , _ := zstd .NewReader (nil , decoderOptions ... )
43+ dec , _ := zstd .NewReader (nil )
5444 c := & compressor {
5545 encoder : enc ,
5646 decoder : dec ,
You can’t perform that action at this time.
0 commit comments