-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(compression): Fix gzip and zlib performance degradation (#20032)
* fix(compression): Fix gzip and zlib performance degradation Fix gzip and zlib performance degradation caused by: * flate2 v1.0.28 started to resize its input buffer up to its capacity and back to the actual number of bytes written. * Some sinks are writing to Compressor without buffering, resulting in frequent small writes to the flate2 writer. Within 32KB of input buffer in flate2, this causes an excessive number of memset operations and degraded sink throughput. This fix introduces a wrapper buffer in front of gzip and zlib writers to accumulate data before calling the write function of the underlying writer. Signed-off-by: Artur Malchanau <[email protected]> * Add a link to the comment with more context. --------- Signed-off-by: Artur Malchanau <[email protected]>
- Loading branch information
Showing
2 changed files
with
66 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Fixed gzip and zlib compression performance degradation introduced in v0.34.0. | ||
|
||
authors: Hexta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters