Sergiy Teplyakov's Avatar

Sergiy Teplyakov

@steplyakov

Software Engineer at MSFT. Opinions are my own.

315
Followers
47
Following
89
Posts
06.12.2024
Joined
Posts Following

Latest posts by Sergiy Teplyakov @steplyakov

Tree view with the processes on the left, timeline of exceptions in processes up top, data grid with the exception details in the center and current exception call stack at the bottom

Tree view with the processes on the left, timeline of exceptions in processes up top, data grid with the exception details in the center and current exception call stack at the bottom

PerfView can record all managed exceptions in all processes system-wide thanks to the .NET ETW provider, with callstacks.

I built a viewer for these .etl files:

21.02.2026 20:23 πŸ‘ 40 πŸ” 8 πŸ’¬ 3 πŸ“Œ 1

And I would appreciate spreading the word and sharing the video.

And if you have recommendations on what I can cover next, I'll be happy to hear that!

20.02.2026 14:18 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
NET 10 Delegate De Abstraction
NET 10 Delegate De Abstraction YouTube video by Dissecting The Code

Next video on Dissecting the Code channel. This time I cover .NET 10 performance improvements around de-abstracting the delegates.

In .NET 10, the LINQ Any method can easily outperform a manual loop over a list! Awesome job, .NET team!

youtu.be/-h5251IWv-Y?...

And, as always, thanks for watching!

20.02.2026 14:18 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

And, as always, thanks for sharing.

/cc: @davidfowl.com, @scott.hanselman.com, @migueldeicaza.bsky.social

04.02.2026 16:46 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I've seen cases when the application code was filled with it "to improve performance" or "to avoid deadlocks". And it was very hard to convince that this is not how ConfigureAwait should be used.

In this video I'm covering why we have ConfigureAwait in the first place and how to use it correctly.

04.02.2026 16:46 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Stop using ConfigureAwait(false) incorrectly!
Stop using ConfigureAwait(false) incorrectly! YouTube video by Dissecting The Code

Another video on Dissecting the Code YouTube channel: "ConfigureAwait best practices".

I feel we have a cargo cult on using ConfigureAwait without thinking too much.

youtu.be/bUHQeY-DlBc?...

04.02.2026 16:46 πŸ‘ 2 πŸ” 2 πŸ’¬ 1 πŸ“Œ 0
Post image

Do you know that just changing the C# langversion might affect performance?

The code generation for method group conversion has changed in C# 11 to avoid allocations in certain cases.

02.02.2026 16:45 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 1

And, as always, I would really appreciate the repost!

/cc: @kirillosenkov.com, @davidfowl.com, @jaredpar.bsky.social, @migueldeicaza.bsky.social, @scott.hanselman.com, @damianedwards.com

20.01.2026 16:16 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
.NET 10 De-Abstraction in Action
.NET 10 De-Abstraction in Action YouTube video by Dissecting The Code

Link to the video: youtu.be/Ysg85IR6rMc?...

20.01.2026 16:16 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

New video on Dissecting the Code YouTube channel: ".NET 10 De-Abstraction in Action", that covers how .NET 10 almost completely eliminates the abstraction penalty when iterating over interfaces.

#dotnet10, #performance

20.01.2026 16:16 πŸ‘ 7 πŸ” 3 πŸ’¬ 1 πŸ“Œ 0

And big thanks to Egor from the JIT team for showing his awesome bot!

08.01.2026 14:26 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Add AggressiveInlining to EnsureInitializedCore method to allow delegates stack alloc by SergeyTeplyakov Β· Pull Request #122983 Β· dotnet/runtime Currently stack allocation (and overall de-abstraction) works only when JIT can has a full understanding of the code. And due to lack of cross-prodcedural analysis it means that for the optimizatio...

Here is a link to my PR: github.com/dotnet/runti...

And once this is merged we should have way fewer allocations when using LazyInitializer.EnusreInitialized by stack-allocating a delegate passed as Func<T>

08.01.2026 14:26 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

TIL that dotnet/runtime github repo has an awesome bot for running the benchmarks to compare the before and after!

Here is an example:

08.01.2026 14:26 πŸ‘ 4 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Ah! I get the issue. The clients won’t be able to use the lib if it has extension members! Sigh!

08.01.2026 14:08 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I’m curious what’s the issue with manually specifying lang version as 14 when targeting older frameworks? I constantly relying on this even using latest C# when targeting Full Framework (yes some features won’t work, but the vast majority will work).

08.01.2026 14:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

Do you know that .NET 10 massively reduces the overhead of using any built-in collections via interfaces (yes, not only for arrays)?

Iterating a list via IList<T>, or dictionary via 'IDictionary<K,V>', etc., now has almost zero abstraction penalty!

05.01.2026 15:33 πŸ‘ 8 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0
Preview
Fabulous Adventures in Data Structures and Algorithms - Eric Lippert Author Eric Lippert introduces fabulous solutions using uncommon algorithms and data structures. There’s a lot more to algorithms than the useful-but-boring recipes you recite for every interview. Th...

I'm writing another book, and the first few chapters are available through Manning Early Access now! For 50% off!

hubs.la/Q03Q9PGP0

More details, and the story of how I came to write it, are on my blog at

ericlippert.com/2025/10/30/i...

It feels great to be writing again after a long break. :)

30.10.2025 16:39 πŸ‘ 47 πŸ” 17 πŸ’¬ 5 πŸ“Œ 0

Yep. But this is something that I've figured out just earlier today.
Was hoping for something in .editorconfig: `dotnet_diagnostics.category-Compiler.severity = error'. But I don't think that's available.
The point is that its a roundabout way to achieving this. And not easy to find.

23.10.2025 14:55 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

its a bit too much :). I would definitely prefer one liner.
My option is two liners which is ok, but requires directory.build.props. I'm surprised that it's seems impossible to do that in one line in .editorconfig.

23.10.2025 14:13 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Correction: I want to keep static analysis warnings as warnings.

23.10.2025 13:44 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I want to fail the build on compiler warnings, but keep the diagnostics warnings as warnings.
One option that I've found is to set 'TreatWarningsAsErrors' to true, and set 'CodeAnalysisTreatWarningsAsErrors' to false.
Is there a better way?

/cc: @jaredpar.bsky.social, @terrajobst.net

23.10.2025 13:42 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
Finding a VS Code Memory Leak In 2021 I found a huge memory leak in VS code, totalling around 64 GB when I first saw it, but with no actual limit on how high it could go. I found this leak despite two obstacles that should have…

New blog post:
In 2021 I found an invisible memory leak in a tool (VS Code) that I have never used. Impossible? Easy:
randomascii.wordpress.com/2025/10/09/f...

09.10.2025 20:27 πŸ‘ 53 πŸ” 15 πŸ’¬ 1 πŸ“Œ 0

As always, I'll appreciate the feedback and I would love if you share the video with your network! It means a lot to me!

/cc: @visualstudio.com, @migueldeicaza.bsky.social, @rephuffman.bsky.social, @scott.hanselman.com, @davidfowl.com

08.10.2025 21:07 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Parallel Stacks: The best Visual Studio feature for asynchronous and parallel code
Parallel Stacks: The best Visual Studio feature for asynchronous and parallel code YouTube video by Dissecting The Code

New video on Dissecting the Code YouTube Channel.

This time, it's about Parallel Stacks - my very favorite
@visualstudio.com
feature that you probably are not using enough!

I can't even count how many times it helped me production incidents investigations!
youtu.be/Z5mN0VCB-KA?...

08.10.2025 21:07 πŸ‘ 2 πŸ” 2 πŸ’¬ 1 πŸ“Œ 0
Preview
Dissecting The Code Dissecting the Code is a channel for developers who want to master .NET from the inside out. If you're tired of surface-level tutorials and want to truly understand what’s happening under the hood, y...

And if by any chance you haven't subscribed yet, here is the link to the channel ;)

www.youtube.com/@DissectingT...

06.10.2025 14:51 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

Hey #dotnet people. First milestone for Dissecting the Code YouTube channel - 1k subscribers!

Thanks a lot everyone for your support and warm feedback that I'm getting!

06.10.2025 14:51 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Oh! They use a custom taskscheduler for that. Interesting!

02.10.2025 21:14 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

/cc: @migueldeicaza.bsky.social, @terrajobst.net, @scott.hanselman.com, @visualstudio.com, @damianedwards.com and other. I would really appreciate if you'll share the link!

02.10.2025 18:40 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Dissecting ConfigureAwait in C#
Dissecting ConfigureAwait in C# YouTube video by Dissecting The Code

After a short break I'm back with the new video on Dissecting the Code YouTube channel.

This time its all about ConfigureAwait, why we ended up having it and how it works under the hood!

#dotnet folks, please share! I'll really appreciate it!

youtu.be/RZsLA_R8i9s?...

02.10.2025 18:40 πŸ‘ 11 πŸ” 5 πŸ’¬ 2 πŸ“Œ 0
Preview
docs/docs/standard/unsafe-code/best-practices.md at main Β· dotnet/docs This repository contains .NET Documentation. Contribute to dotnet/docs development by creating an account on GitHub.

Egor landed yesterday a great document about C# "Unsafe code best practices" https://github.com/dotnet/docs/blob/main/docs/standard/unsafe-code/best-practices.md πŸ“œ

Even if you think you know them, it is a good read as a reminder! 😎

#dotnet #csharp

19.09.2025 09:24 πŸ‘ 8 πŸ” 6 πŸ’¬ 0 πŸ“Œ 0