Description
We're using Task.Run to queue the completion of operations on the global queue. However, since we don't use the returned Task this is adding a lot of unnecessary overhead. We can use UnsafeQueueUserWorkItem instead to queue on the global queue instead. Using the Unsafe variant also emulates the behavior of ExecutionContext.SuppressFlow but more efficiently.
Attachments
For Gerrit Dashboard: NCBC-2970 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
162018,3 | NCBC-2970: Improve perf of op completion using UnsafeQueueUserWorkItem | master | couchbase-net-client | Status: MERGED | +2 | +1 |