Too good to be true: an unexpected profiler trap
Sometimes the most convincing performance gains deserve a second look. A reminder that profiling data can be more subtle than it first appears.
I got "tricked" by PerfView when using it to measure the effectiveness of my optimizations, so I decided to write about it: minidump.net/an-unexpecte...
It's not specific to PerfView though, in theory this could happen with any profiler.
20.02.2026 12:47
👍 8
🔁 5
💬 1
📌 0
Ok, so I wrote a very long and kinda personal thing about existential dread and the end of programming, and I'm not really sure I want to endure the discourse, but if you want to read it, it's here - gist.github.com/davidwhitney...
It's like 6,000 words long, sorry.
17.02.2026 21:38
👍 29
🔁 9
💬 10
📌 4
Thanks!
17.02.2026 23:01
👍 1
🔁 0
💬 0
📌 0
Scrolling list of ASP.NET log output
Show all the routes of a site
Show all the configuration values for an ASP.NET site and their source
Shows the DI configuration
If you didn't catch it, this shows the current logs, DI config, environment and ASP.NET routes in the terminal when you do a dotnet run on an ASP.NET app. Combines a bunch of snippets I've borrowed from @meziantou.net and @andrewlock.bsky.social posts and dumping them into the console.
04.02.2026 19:58
👍 4
🔁 1
💬 1
📌 0
In this case "better" is just "more like the original source" ☺️ e.g. dotpeek has two nested for loops like the original, where ilspy has a for and a while.
ILSpy pita the label in the right place though 😅
04.02.2026 18:53
👍 0
🔁 0
💬 0
📌 0
And thanks to friends in high places (cough @kevingosse.net):
youtrack.jetbrains.com/issue/DOTP-8...
03.02.2026 10:51
👍 3
🔁 0
💬 0
📌 0
The source code for MemoryExtensions.TrimEnd, showing the 'Next' label after the break
The source code for the ILSpy-decompiled version, which uses an inner while loop, but contains the IL_0044 (Next) label at the right place
The source code for the dotPeek-decompiled version, which uses an inner while loop, but contains the label_8 (Next) label in the _wrong_ place
We discovered something interesting... the decompiled output of ILSpy and dotPeek differs. Which is fine...dotPeek does a "better" job in general... except that in this case, the dotPeek code includes an infinite loop bug 😅
1) Original source for MemoryExtensions.TrimEnd()
2) ILSpy
3) dotPeek
03.02.2026 10:16
👍 5
🔁 0
💬 2
📌 0
Recent updates to NetEscapades.EnumGenerators: new APIs and System.Memory support
In this post I describe some recent changes to the NetEscapades.EnumGenerators source generator, including support for the System.Memory package and new APIs
Speed up enum ToString and parsing with @andrewlock.bsky.social's latest NetEscapades.EnumGenerators update: disable number parsing, serialize in lower or upper invariant, and get span support via System.Memory on older targets.
#csharp #dotnet
29.01.2026 15:49
👍 1
🔁 1
💬 0
📌 0
Yep, easiest way is prob to use the open telemetry Prometheus exporter: learn.microsoft.com/en-us/dotnet...
29.01.2026 02:09
👍 2
🔁 0
💬 0
📌 0
Creating and consuming metrics with System.Diagnostics.Metrics APIs
In this post I provide an introduction to the System.Diagnostics.Metrics API, and show how to create a custom metric and read it with dotnet-coutners
Blogged: Creating and consuming metrics with System.Diagnostics.Metrics APIs
andrewlock.net/creating-and...
In this post I provide an introduction to the System.Diagnostics.Metrics API, show how to create a custom metric, and show how to read it with dotnet-counters
#dotnet
27.01.2026 15:26
👍 8
🔁 3
💬 2
📌 0
The book "ASP.NET Core In Action" sitting on a desk. The front cover has an image of a man in a robe with a long beard and a tall hat on his head.
So I can learn what I need for both a new job and my game, I'm reading the massive ASP.NET Core In Action by @andrewlock.bsky.social. My roommate called it a magical tome and pointed out: there's even a wizard on the cover!
Anyway, now I imagine I'm reading a magical tome for casting complex spells
20.01.2026 14:30
👍 7
🔁 2
💬 0
📌 0
Blogged: Making foreach of an IEnumerable allocation-free, using reflection and dynamic methods
andrewlock.net/making-forea...
In this post I describe why foreach sometimes allocates, and show how you can use DynamicMethod and Reflection.Emit to go allocation-free
#dotnet #csharp
20.01.2026 16:17
👍 4
🔁 0
💬 0
📌 0
Gah, sorry about that, that's embarrassing🤦♂️Fixed now
15.01.2026 10:13
👍 0
🔁 0
💬 1
📌 0
The Windows File Explorer replacement, File Pilot, is awesome
In this post I describe my experience with the Windows File Explorer replacement, File Pilot. It's blazingly fast, feature rich, and has hotkeys everywhere
Blogged: The Windows File Explorer replacement, File Pilot, is awesome
andrewlock.net/windows-expl...
In this post I describe my experience with the Windows File Explorer replacement, File Pilot. It's blazingly fast, feature rich, and has hotkeys everywhere
13.01.2026 19:45
👍 20
🔁 2
💬 1
📌 0
Recent updates to NetEscapades.EnumGenerators: new APIs and System.Memory support
In this post I describe some recent changes to the NetEscapades.EnumGenerators source generator, including support for the System.Memory package and new APIs
Blogged: Recent updates to NetEscapades.EnumGenerators: new APIs and System.Memory support
andrewlock.net/updates-to-n...
In this post I describe some recent changes to the NetEscapades.EnumGenerators source generator, including support for the System.Memory package and new APIs
#dotnet
06.01.2026 16:01
👍 6
🔁 1
💬 0
📌 0
@danclarke.com also made the jump recently, in case he has any updates/advice 🙂
27.12.2025 07:18
👍 1
🔁 0
💬 1
📌 0
Spectre.Console Documentation
Documentation for Spectre.Console and Spectre.CLI - rich console UI library and command-line application framework for .NET
The new Spectre.Console (and Spectre.Console.Cli) website is now live! 🎉
This is all courtesy of @philco.bsky.social, who has done an amazing job, just as he did with the previous website.
spectreconsole.net
24.12.2025 18:43
👍 45
🔁 13
💬 1
📌 0
https://damienbod.com/2025/12/20/digital-authentication-and-identity-validation/
Blogged: Digital Authentication and Identity validation
damienbod.com/2025/12/20/d...
#oidc #identity #iam #swiyu #eid #oauth #dpop #openid #security #ecollecting #authentication #loa #loi #vc #oauth2 #swiss #ch #cybersecurity
20.12.2025 11:36
👍 5
🔁 2
💬 0
📌 0
Investigating a deadlock in Visual Studio
A short investigation that showcases one of the most common problem faced when writing a profiler.
Today I ran into a deadlock in VS2026. I debugged it, and it turned out to be a common issue you may run into when writing a profiler.
I wrote a short article about it: minidump.net/investigatin...
17.12.2025 17:55
👍 8
🔁 4
💬 0
📌 0
Creating a .NET CLR profiler using C# and NativeAOT with Silhouette
In this post I look at how to create a simple .NET profiler. But instead of using C++, the profiler uses C# and NativeAOT with the Silhouette library
Blogged: Creating a .NET CLR profiler using C# and NativeAOT with Silhouette
andrewlock.net/creating-a-d...
In this post I look at how to create a simple .NET profiler. But instead of using C++, the profiler uses C# and NativeAOT with @kevingosse.net's Silhouette library
#dotnet
16.12.2025 18:10
👍 13
🔁 3
💬 0
📌 0
Trying out the Zed editor on Windows for .NET and Markdown
In this post I try out Zed on Windows to see if it can replace my VS Code usages for quick edits of .NET projects and writing Markdown documents
Blogged: Trying out the Zed editor on Windows for .NET and Markdown
andrewlock.net/trying-out-t...
In this post I try out Zed on Windows to see if it can replace my VS Code usages for quick edits of .NET projects and writing Markdown documents.
#dotnet
09.12.2025 18:30
👍 12
🔁 2
💬 3
📌 0