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

Reduce the size of ResponseHeader and RequestHeader #1826

Merged
merged 3 commits into from
Aug 20, 2024

Conversation

ksw2000
Copy link
Contributor

@ksw2000 ksw2000 commented Aug 10, 2024

Replace the field bufKV whose size is 56 bytes in ResponseHeader and RequestHeader with two []byte fields only 48 bytes.

  • Reduce ResponseHeader from 320 to 312 bytes.
  • Reduce RequestHeader from 360 to 352 bytes.
  • In the benchmark tests, although there is no significant performance improvement, it theoretically reduces memory usage by 2.2% to 2.5%.

+ Reduce ResponseHeader from 320 to 312 bytes
+ Reduce RequestHeader from 360 to 352 bytes
+ In the benchmark tests, although there is no significant performance improvement, it theoretically reduces memory usage by 2.2% to 2.5%.
@ksw2000 ksw2000 marked this pull request as ready for review August 10, 2024 16:45
@erikdubbelboer erikdubbelboer merged commit 9df444b into valyala:master Aug 20, 2024
18 of 19 checks passed
@erikdubbelboer
Copy link
Collaborator

Thanks, I didn't even realize we were using an argsKV without using any of the methods on an argsKV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants