-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
AsyncWrapper: Improve performance when blocking #3435
AsyncWrapper: Improve performance when blocking #3435
Conversation
09c087f
to
2fa92a4
Compare
Codecov Report
@@ Coverage Diff @@
## release/4.6.4 #3435 +/- ##
==============================================
+ Coverage 80% 80% +<1%
==============================================
Files 358 358
Lines 28514 28514
Branches 3813 3813
==============================================
+ Hits 22825 22844 +19
+ Misses 4589 4574 -15
+ Partials 1100 1096 -4 |
2fa92a4
to
8210816
Compare
Hi, Is this a bug fix or an (performance)enhancement? |
It is continuation from #3416 where I tried to fix the "bug" of failing to handle a RequestLimit of 2 with Blocking-mode. It is a simplification of the previous commit. So instead of trying to be clever then it just takes a performance hit when blocking mode has been activated. The simplication reduces the number of modifications of the _count variable, so less memory write barriers are needed when blocking mode is activated. Improves the concurrency of the producers as they are less chatty. But now all producers will eagerly try to wake the timer-thread after blocking mode has been activated. This might kill any performance gain from improving producer concurrency. But I like the simplicity of this change, and my simple performance tests still shows good performance |
23fd656
to
a561e08
Compare
a561e08
to
4f11baf
Compare
thanks! Merged! |
ConcurrentRequestQueue - Always see queue as empty after reached RequestLimit (and resolved it)
When reaching the RequestLimit, then producers perform asymmetric update of queue-count.
Instead of trying to coordinate which of the producers should signal start-timer, then all producers will signal start-timer since it is "exceptional" situation.