Reduce copies for data frames but copy header and data to reduce SSL record count #5916
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.
Another variant of PR #5897 which reduced the copies made while creating HTTP/2 frames. That PR eliminated both extra copies by there was always a separate small SSL record corresponding to the HTTP2 frame header.
This PR leaves one copy so the HTTP2 frame header and the frame contents are in the same IOBlock. There may still be some small records if the HTTP2 frame size is close to the SSL record size.
HTTP/1.1 has an easier time for a bulk download with the SSL records, since the SSL writing logic will just chop up the long stream. In the case of H2, we must divide things into H2 frames and then potentially divide those into SSL records.