Thanks a lot everyone for your support and warm feedback that I'm getting!
Thanks a lot everyone for your support and warm feedback that I'm getting!
Just published another episode on Dissecting the Code channel: How Google Broken the Internet and Why It Took 3 Hours to Recover?
It's about null pointer bugs, retry logic and a bit of .NET Aspire used for visualizing the metrics.
Please share and sub!
Just published another episode on Dissecting the Code channel: How Google Broken the Internet and Why It Took 3 Hours to Recover?
It's about null pointer bugs, retry logic and a bit of .NET Aspire used for visualizing the metrics.
Please share and sub!
ValueTasks are tricky and they can't be stored in a field, or awaited multiple times. Preserve "fixes" that by allocating Task<T> under the hood.
ValueTasks are tricky and they can't be stored in a field, or awaited multiple times. Preserve "fixes" that by allocating Task<T> under the hood.
Just published another episode on Dissecting the Code YouTube channel - "Can Tiered Compilation Cause Memory Leaks in .NET".
This video is about a change in behavior between full framework on .net 9 in respect to GCInfo and how it affect memory usage.
Just published another episode on Dissecting the Code YouTube channel - "Can Tiered Compilation Cause Memory Leaks in .NET".
This video is about a change in behavior between full framework on .net 9 in respect to GCInfo and how it affect memory usage.
This may sound too simplistic, but I've seen such code being checked in by an accident. And I've faced StackOverflowException because of that in my tests before myself as well.
This may sound too simplistic, but I've seen such code being checked in by an accident. And I've faced StackOverflowException because of that in my tests before myself as well.
Just published another episode on Dissecting the Code YouTube channel - "Dissecting Memory Leaks in .NET".
How global events, hidden static collection and timers can cause memory leaks and the ways to avoid it.
Link in the comment below.
Just published another episode on Dissecting the Code YouTube channel - "Dissecting Memory Leaks in .NET".
How global events, hidden static collection and timers can cause memory leaks and the ways to avoid it.
Link in the comment below.
It's going to be very similar to my blog with a lot of deep dives into #dotnet, #csharp etc.
I've already published the first two videos:
➡️ Episode 0: What You'll Learn Here
➡️ Episode 1: Dissecting Variable Lifetime
It supports:
* built-in methods
* StringSyntaxAttribute
* Methods listed in .editorconfig
Try to run it in your codebase, you might be surprised, how many violations do you have!
It supports:
* built-in methods
* StringSyntaxAttribute
* Methods listed in .editorconfig
Try to run it in your codebase, you might be surprised, how many violations do you have!
Here is the code:
Here is the code:
But do you know that an instance can be GCed **before** the instance method is called?
This works in Release mode only due to the tracking the JIT does via GCInfo.
#dotnet
But do you know that an instance can be GCed **before** the instance method is called?
This works in Release mode only due to the tracking the JIT does via GCInfo.
#dotnet
Was helping in a performance analysis and it was not clear where the time is spent exactly. Re-ran profiler in debug build to see that it was a property getter that was used in a hot loop!
Was helping in a performance analysis and it was not clear where the time is spent exactly. Re-ran profiler in debug build to see that it was a property getter that was used in a hot loop!
If you need to check if a char is within a string, using 'str.IndexOf(c) != -1' is way more efficient than using 'str.Contains(c)' which is a call to 'Enumerable.Contains(string, c)'.
Actually the IndexOf version is way more efficient!
(the results for full framework)
If you need to check if a char is within a string, using 'str.IndexOf(c) != -1' is way more efficient than using 'str.Contains(c)' which is a call to 'Enumerable.Contains(string, c)'.
Actually the IndexOf version is way more efficient!
(the results for full framework)
The post is very close to a 5 Why type of postmortem we use internally for the incidents where I cover an investigation of crashes caused by NullReferenceExceptions from the finalizers.
#dotnet
The post is very close to a 5 Why type of postmortem we use internally for the incidents where I cover an investigation of crashes caused by NullReferenceExceptions from the finalizers.
#dotnet
One notable thing: lack of enumerator boxing allocations when iterating over an array via `IEnumerable
The link to github: github.com/dotnet/runti...
One notable thing: lack of enumerator boxing allocations when iterating over an array via `IEnumerable
The link to github: github.com/dotnet/runti...
The gif from amazing @kirillosenkov.com is the best way to visualize the issues with async void. Kind of - ¯\_(ツ)_/¯.
The link to the blog post: sergeyteplyakov.github.io/Blog/csharp/...
#dotnet, #csharp
The gif from amazing @kirillosenkov.com is the best way to visualize the issues with async void. Kind of - ¯\_(ツ)_/¯.
The link to the blog post: sergeyteplyakov.github.io/Blog/csharp/...
#dotnet, #csharp
Just saw that a custom enum to string conversion was quite expensive. Added a new version and compared the optimization with just 'enum.ToString'
The old "optimization" was 5x slower and was allocating way more memory!
Just saw that a custom enum to string conversion was quite expensive. Added a new version and compared the optimization with just 'enum.ToString'
The old "optimization" was 5x slower and was allocating way more memory!