Skip to content
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

grpc: skip compression of empty messages #6842

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

jroper
Copy link
Contributor

@jroper jroper commented Dec 9, 2023

Fixes #6831.

This avoids compressing messages that are empty, since you can't compress zero bytes to anything smaller than zero bytes, and most compression algorithms output headers and trailers which means the resulting message will be non-zero bytes.

RELEASE NOTES:

  • grpc: skip compression of empty messages (as an optimization)

Fixes grpc#6831.

This avoids compressing messages that are empty, since you can't compress zero
bytes to anything smaller than zero bytes, and most compression algorithms
output headers and trailers which means the resulting message will be non-zero
bytes.
Copy link

codecov bot commented Dec 9, 2023

Codecov Report

Merging #6842 (1591994) into master (1b05500) will increase coverage by 0.32%.
Report is 10 commits behind head on master.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6842      +/-   ##
==========================================
+ Coverage   83.33%   83.65%   +0.32%     
==========================================
  Files         285      286       +1     
  Lines       30879    30804      -75     
==========================================
+ Hits        25732    25769      +37     
+ Misses       4067     3976      -91     
+ Partials     1080     1059      -21     
Files Coverage Δ
rpc_util.go 77.84% <100.00%> (+0.19%) ⬆️

... and 31 files with indirect coverage changes

@dfawley dfawley self-assigned this Dec 13, 2023
@easwars easwars added the Type: Performance Performance improvements (CPU, network, memory, etc) label Dec 13, 2023
@easwars easwars added this to the 1.61 Release milestone Dec 13, 2023
@easwars easwars changed the title Don't compress empty messages grpc: skip compression of empty messages Dec 13, 2023
@ginayeh ginayeh requested a review from arvindbr8 January 3, 2024 16:53
@ginayeh ginayeh assigned arvindbr8 and unassigned dfawley Jan 3, 2024
@arvindbr8
Copy link
Member

Although the patch set looks good to me. I would still wait for @dfawley to approve the changes since he has the most context on the issue #6831

@arvindbr8 arvindbr8 assigned dfawley and unassigned arvindbr8 Jan 4, 2024
@arvindbr8 arvindbr8 requested review from dfawley and removed request for arvindbr8 January 4, 2024 20:36
@dfawley dfawley merged commit 3a8270f into grpc:master Jan 9, 2024
14 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Performance Performance improvements (CPU, network, memory, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compression is applied to empty messages, which makes them bigger, not smaller
4 participants