-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Publish - avoid async state machine when possible #373
Conversation
Marking as draft as there are quite a few failing tests I need to look into before it's ready for review |
Semaphore here is giving us better performance clearly. Main gain is probably not having to manage timeouts with cancellation tokens. |
Could also be seeing gains from skipping the async state machinery |
Signed-off-by: Caleb Lloyd <caleb@synadia.com>
d005186
to
3f8cb7b
Compare
Ready for review |
Signed-off-by: Caleb Lloyd <caleb@synadia.com>
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.
LGTM
Brings back optimizations from prior to #346
Performed some benchmarks on Linux:
Send 10 Million Messages Serially:
main
:This PR:
So around 1.9x more throughput.
Publish Serial Microbench
main
:This PR:
Looks pretty similar
Publish Parallel Microbench
main
:This PR:
Faster at concurrency = 1, similar timing at 2 and 4. Allocations jump in this PR quite a bit at concurrency = 4, although they don't escape Gen0. Might be worth investigating why.