Tagperformance

Azure Service Bus: Earn the redesign

A
A picture explaining the earn the redesign lifecycle form the post

TL;DR: Micro-optimizations are not a substitute for design work. They are how you earn the right to redesign. In the Azure Service Bus SDK, repeated work in the Body property first led to smaller allocation fixes. Once those fixes exposed the shape of the problem, a small internal redesign made the code faster, clearer, and easier to reason about. “This code is bad. We should rewrite it.” Most developers have heard that sentence. Many have said it. I have too. The problem is not...

Small optimizations, large systems: tightening the Event Hubs partition key hash loop

S

TL;DR: After temporary allocations were removed from the Azure Event Hubs partition-key encoding path, the Jenkins lookup3 hash loop itself became the next interesting place to look. Tightening that loop reduced CPU overhead, but it also raised the bar for review, portability, and correctness. I like performance work most when it starts with a boring question: why is this small method showing up so much? That question came up while looking at the Azure Event Hubs client. Event Hubs is built for...

Small optimizations, large systems: removing allocations from Event Hubs partition key hashing

S

TL;DR: Small code paths become expensive when cloud workloads execute them millions of times. The Azure Event Hubs partition key resolver is one of those paths. By removing temporary allocations from the partition-key encoding path, the Azure Event Hubs SDK reduced garbage collection pressure on a publishing hot path. I like performance work most when it starts with a boring question: why is this small method showing up so much? That question came up while looking at the Azure Event Hubs client...

Using System.Text.Json alongside Newtonsoft Json.Net

U
Fast car

In June 2019, Microsoft introduced System.Text.Json as a feature of .NET (core) 3.0 to the public. The reason they gave for creating this new namespace was that they were unhappy with the old built-in solution for serializing / deserializing JSON. The poor built-in capabilities to work with JSONs –of course- was the reason for James Newton-King to create Json.Net (for many of us just called Newtonsoft, which actually is his company and not the name of the library). Newtonsoft’s Json.Net...

What factors affect the speed of NServiceBus message processing?

W

I’ve heard that question a number of times during my projects and consultings I did for several customers. Normally that generic answers can only be properly answered with information about the non-functional requirements and Service Level Agreements a certain project has to fulfill. Without knowing about your specific situation it is generally difficult to give hard numbers about the performance you can expect with a single NServiceBus endpoint. But what exactly can influence the speed...

Event Broker Performance

E

I wondered about the performance of my event broker (CodeProject article) implementation in bbv.Common. Event Broker: a notification component for synchronous and asynchronous, loosely coupled event handling. Therefore, I implemented a quick performance test application that prints out the timings for Plain .NET events Event over Event Broker Event over Event Broker with logging extension enabled Event over Event Broker with a matching matcher on the subscriber Event over Event Broker with a...

Recent Posts