Eliminate large copies in resumption code paths#2122
Merged
Conversation
Benchmark resultsInstruction countsSignificant differencesClick to expand
Other differencesClick to expand
Wall-timeSignificant differencesThere are no significant wall-time differences Other differencesClick to expand
Additional informationCheckout details:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2122 +/- ##
=======================================
Coverage 94.63% 94.63%
=======================================
Files 102 102
Lines 23412 23412
=======================================
Hits 22157 22157
Misses 1255 1255 ☔ View full report in Codecov by Sentry. |
cpu
reviewed
Sep 13, 2024
Member
cpu
left a comment
There was a problem hiding this comment.
This changeset makes sense to me. Is there a reason to keep it draft?
| use crate::msgs::handshake::SessionId; | ||
| use crate::msgs::persist::Tls13ClientSessionValue; | ||
| use crate::suites::SupportedCipherSuite; | ||
| use crate::msgs::base::PayloadU16; |
Member
There was a problem hiding this comment.
Worth a mention in the commit message to help motivate the choice of PayloadU16 vs Vec?
Member
Author
I got very sidetracked with the ci-bench issue; will come back to this. |
076ffe9 to
3da14c0
Compare
This comment was marked as outdated.
This comment was marked as outdated.
2 similar comments
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This reduces the cost of ClientSessionCommon::clone, which is inherent in every `ClientSessionStore` probe operation.
These can be large (hundreds of bytes), and even larger (thousands of bytes) if the server decides to include the client's identity. Parse them into an Arc, and then maintain that on the path to the session store.
3da14c0 to
098520a
Compare
djc
approved these changes
Sep 26, 2024
cpu
approved these changes
Sep 26, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This fixes two large-ish copies in client resumption paths.
These were identified by:
derive(Clone)into manual implementations,