-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
88950: server: compress gzip-encoded HTTP responses r=knz a=sjbarag HTTP requests with `Accept-encoding: gzip` result in a gzip-encoded response with `Content-encoding: gzip` as expected, but with a gzip body that was uncompressed. This resulted in responses that were slightly larger than their uncompressed versions due to the inclusion of gzip headers and trailers. Replace gzip_response_writer with github.com/NYTimes/gziphandler, and compress gzip-encoded HTTP responses. This increases response time for extremely large responses (e.g. 25MB uncompressed for /bundle.js) to approximately 500ms in exchange for a reduced transfer size (e.g. transferring 7MB compressed for /bundle.js). fixes #88934 Release note (performance improvement): HTTP requests with 'Accept-encoding: gzip' previously resulted in valid gzip-encoded but uncompressed responses. This resulted in inefficient HTTP transfer times, as far more bytes were transferred than necessary. Those responses are now properly compressed, resulting in smaller network responses. 88989: storage: avoid `EncodeMVCCValue` struct comparison r=erikgrinaker a=erikgrinaker In Go 1.19, struct comparisons saw a significant performance regression, apparently due to the use of `memeqbody`. This patch changes `EncodeMVCCValue` to use field comparisons instead of struct comparisons, which yields a significant performance gain. Unfortunately, this prevents mid-stack inlining. However, the struct comparison regression is significantly larger than the inlining gains. We should reconsider this once Go 1.20 lands, where the regression has been fixed. ``` name old time/op new time/op delta EncodeMVCCValue/header=empty/value=tombstone-24 5.96ns ± 1% 4.66ns ± 0% -21.85% (p=0.000 n=9+9) EncodeMVCCValue/header=empty/value=short-24 5.93ns ± 0% 4.66ns ± 0% -21.40% (p=0.000 n=9+9) EncodeMVCCValue/header=empty/value=long-24 5.92ns ± 0% 4.66ns ± 0% -21.31% (p=0.000 n=10+10) EncodeMVCCValue/header=local_walltime/value=tombstone-24 51.9ns ± 1% 49.5ns ± 1% -4.81% (p=0.000 n=9+10) EncodeMVCCValue/header=local_walltime/value=short-24 54.2ns ± 1% 52.5ns ± 1% -3.25% (p=0.000 n=10+10) EncodeMVCCValue/header=local_walltime/value=long-24 1.34µs ± 2% 1.36µs ± 1% +1.69% (p=0.001 n=10+9) EncodeMVCCValue/header=local_walltime+logical/value=tombstone-24 56.3ns ± 0% 53.3ns ± 1% -5.40% (p=0.000 n=10+10) EncodeMVCCValue/header=local_walltime+logical/value=short-24 58.8ns ± 0% 56.3ns ± 2% -4.18% (p=0.000 n=10+9) EncodeMVCCValue/header=local_walltime+logical/value=long-24 1.36µs ± 3% 1.36µs ± 1% ~ (p=0.269 n=10+9) ``` Resolves #88818. Release note: None Co-authored-by: Sean Barag <[email protected]> Co-authored-by: Erik Grinaker <[email protected]>
- Loading branch information
Showing
11 changed files
with
56 additions
and
148 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
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
Submodule vendor
updated
9 files