Scooletz / QueueBatch

WebJobs/Azure Functions trigger providing batches of Azure Storage Queues messages directly to your function
Apache License 2.0
41 stars 4 forks source link

FastQueue perf compared to SDK #4

Closed yevhen closed 6 years ago

yevhen commented 6 years ago

How does FastQueue achieves "up to 20x" faster than SDK provided client? What is the secret sauce?

Scooletz commented 6 years ago

I have two implementations, the SDK and the fast one: https://github.com/Scooletz/QueueBatch/blob/develop/src/QueueBatch/Impl/Queues/FastCloudQueue.cs

My fast approach uses:

So basically, no allocations, no encoding and no XmlReader. Benchmarking might be affected by distance to DC (so for long hops it won't be 20x), still, this non-alloc approach pays off a lot.

If this answers it, please close the issue @yevhen

yevhen commented 6 years ago

Yes. Thank you!