-
-
Notifications
You must be signed in to change notification settings - Fork 408
[SCTP] improve payload queue push performance #365
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
Conversation
Codecov ReportBase: 59.99% // Head: 59.97% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #365 +/- ##
==========================================
- Coverage 59.99% 59.97% -0.03%
==========================================
Files 504 504
Lines 48068 48070 +2
Branches 12517 12519 +2
==========================================
- Hits 28838 28828 -10
- Misses 10011 10019 +8
- Partials 9219 9223 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
self.length.fetch_add(1, Ordering::SeqCst); | ||
self.update_sorted_keys(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦♂️
Sorry I must have made a mistake, the tests started failing. I'll fix it soon Fixed 👍 |
…the tsn does not match
As discussed in #360 Gathering packets to send is a big chunk of the work the Association::write_loop is doing while in a critical section.
This PR improves the performance of this by making the payload queue more performant to push to.
Previously this did a full mergesort (O(n*log(n))) on all the in-flight TSNs, now it does a binary search (O(log(n)))