Closed SeanFeldman closed 5 years ago
I have benched dev branch and PR-611, I've extracted the two .diagsession that I link to this post: https://www.dropbox.com/s/y35tanvdoybkbu3/dev-branch.diagsession?dl=0 https://www.dropbox.com/s/vqjezib4uart9s2/PR-611.diagsession?dl=0
I haven't time yet to compare both profiles but you should be able to do so.
I also made a project repro here: https://github.com/bbougot/PR611 You have only to create a Service Bus Queue and fill the two required values "QUEUE_NAME" and "Endpoint=" to the respective Azure Service Bus queue name and connection string.
Basically, it is made to send batch of 1000 messages every 100 milliseconds and by switching Task/ValueTask depending on the branch we are (dev/PR-611), you will be able to find the differences by profiling the memory using Visual Studio profiler.
Please also notice you may encounter a memory leak issue related to AMQP I've tracked here.
Doesn't seem like .diagsession are portable. I couldn't load those properly on two different computers. I'll run the sample locally to profile it.
@bbougot I played with the code a bit - don't really see a significant impact. Interestingly enough, ValueTask based version had slightly more Tasks allocations... Mind to share your results as text/screenshots?
Closing as it doesn't seem to be worthy of proceeding.
Experimental PR for issue #609 to see if switching MessageHandlers (message pumps) to
ValueTask
yields any performance benefits.According to
ValueTask
documentation