-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
optimize FirstOutstanding in the sent packet history #3467
Conversation
Working on the integration test failures |
@marten-seemann I need some help 🤨 still haven't figured out the cause yet |
nvm, found the problem. |
Codecov Report
@@ Coverage Diff @@
## master #3467 +/- ##
==========================================
+ Coverage 85.66% 85.69% +0.02%
==========================================
Files 137 138 +1
Lines 10009 10039 +30
==========================================
+ Hits 8574 8602 +28
- Misses 1059 1060 +1
- Partials 376 377 +1
Continue to review 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.
Thank you! This looks pretty good.
It would probably be good to have a test that Iterate
iterates in the right order, when skipping between the two lists.
done |
@marten-seemann the latest commit 7cedeed tries to solve #300 using AVL tree for gaps. I've already done most of the work but there's a nasty bug somewhere in handling the start/end gaps causing the tests to fail. I spent the entire night trying to debug without any luck... maybe you can take a look? |
I'll have a look at this next week. OOO this week. |
I've found the problem and fixed it. Can confirm that it works perfectly in real-world applications too. With these 2 changes I can get a stable 400-500 Mbps on $5 AWS Lightsail - more than quadrupling the performance. I will continue to check where the new bottlenecks are and try to optimize them in another PR. Maybe we should introduce
Or we can just put them together as one big optimization PR? |
Where’s that tree implementation coming from? I’m not convinced that quic-go should be in the business of implementing a tree data structure from scratch. |
These are two completely different issues. They need to be resolved in separate PRs. |
OK then. I'll create another PR |
It's from https://github.com/ross-oreto/go-tree/blob/master/btree.go but I've made various modifications to meet our use case |
Don't we have multiple linked list implementation in the code already? |
frameSorter changes removed |
Thanks!
We do, but they’re autogenerated from a “generic” implementation copied from the standard library: https://github.com/lucas-clemente/quic-go/tree/master/internal/utils/linkedlist. It’s not pretty, not at all. But it’s a better solution than using an untyped data structure and doing type assertions all the time. |
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.
This looks good, thanks for your work @tobyxdd!
One tiny request for a comment, then we're ready to merge.
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.
Thank you!
* optimize FirstOutstanding * fix variable naming * bug fix * minor code improvements * add a test to make sure that `Iterate` iterates in the right order * add comment
Closes #3462