-
Notifications
You must be signed in to change notification settings - Fork 65
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
Refactor DandelionShuffleThread to run in connection scheduler #65
Refactor DandelionShuffleThread to run in connection scheduler #65
Conversation
Issue validated using Instruments.@barrystyle is 100% right about the blocking loop that causes the CPU time of that thread to spin intensely, which is definitely far too inefficient. The current implementation only enters Lines 1791 to 1798 in 3e6a19a
Also big thumbs up to use the node's scheduler instead of a thread, which, from the looks, should be fine as |
just removed the actual thread definition and 'on shutdown' thread cleanup |
So basically inserting breaks between CPU requests? Genius. |
I just validated that the complexity of Furthermore I pushed two more commits. |
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.
ACK
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.
ACK
Great work on this performance improvement @barrystyle . One thing I would love to start working towards is some unit test coverage around the Dandelion code, but this is great for now.
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.
ACK. Looks good. Tested & working. Thanks for doing this Barry!
This PR refactors the dandelionshuffle thread, to run as a scheduler function which gets called once a second.