fix: change block per-item byte overhead from 2 bytes to 5 bytes for requests #22019
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This updates the number of bytes we add for each block item for potential overhead from 2 bytes to 5 bytes.
During recent performance testing, there were several cases where requests would be created with a serialized size larger than we expected. As we build a "pending request" we make an effort to estimate what the size of the request would be by taking a baseline of 100 bytes and then adding for each item, the
BlockItem#protobufSizewith 2 extra bytes. However, these two bytes seem to small, so we will update it to 5 bytes each which should cover most, if not all, cases. While each item may not have 5 bytes of overhead in reality, by adding this to each item we hopefully avoid cases where we aren't assigning enough overhead.Related issue(s):
This PR is a followup to a previous PR that tried to address ticket #21923
Notes for reviewer:
Checklist