Performance Improvements in .NET 7
<a href="https:&#x2F;&#x2F;devblogs.microsoft.com&#x2F;dotnet&#x2F;performance_improvements_in_net_7&#x2F;#json" rel="nofollow">https:&#x2F;&#x2F;devblogs.microsoft.com&#x2F;dotnet&#x2F;performance_improvemen...</a><p>This is a really interesting, or rather terrifying part of that blog post. I thought I had a reasonably good knowledge about typical performance mistakes in .NET, but I never heard about this particular one.<p>If I understand it right, initializing a fresh JsonSerializerOptions object before each call to Serialize&#x2F;Deserialize in System.Text.Json is incredibly expensive. It essentially disables the cache and means the serializer analyzes this case fully every time. And this is more on the order of 100x as expensive than using the cached version, so not a trivial amount.