Skip to content

Commit

Permalink
Use smaller encoding window, reduce encoder concurrency since we only…
Browse files Browse the repository at this point in the history
… use it serially
  • Loading branch information
ericvolp12 committed Sep 23, 2024
1 parent 41ad263 commit af1adea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/consumer/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ func NewConsumer(
return nil, fmt.Errorf("failed to create clock: %w", err)
}

encoder, err := zstd.NewWriter(nil, zstd.WithEncoderDict(models.ZSTDDictionary))
// Create a zstd encoder using the dictionary and a window size of 8KB
encoder, err := zstd.NewWriter(nil, zstd.WithEncoderDict(models.ZSTDDictionary), zstd.WithWindowSize(2<<12), zstd.WithEncoderConcurrency(1))
if err != nil {
return nil, fmt.Errorf("failed to create zstd encoder: %w", err)
}
Expand Down

0 comments on commit af1adea

Please sign in to comment.