Kevin Gosse
banner
kevingosse.net
Kevin Gosse
@kevingosse.net
Principal engineer at JetBrains, passionate about .NET, performance, and debugging. Microsoft MVP. Co-author of Pro .NET Memory Management (2nd edition)
Fun fact: you can't use print screen to capture a screenshot of a crash of SnippingTool
November 6, 2025 at 8:31 AM
It is! VS2026 shows this exception whenever I debug this solution (github.com/kevingosse/T...)
Something to do with hot reload apparently, but I tried completely disabling hot reload and that doesn't fix it.
November 1, 2025 at 11:14 PM
I had a ton of fun at Techorama NL. It's not everyday that you get a chance to debug variadic .NET functions on a giant movie theater screen.
November 1, 2025 at 9:35 AM
Another way to illustrate: here, CallMe is able to extract the string "hello" even though it feels like it shouldn't be able to.
September 26, 2025 at 1:43 PM
If you have trouble understanding what's going on, have a look at the decompiled code. `Test` allocates a single closure for the calls to `CallMe1` and `CallMe2`.
September 26, 2025 at 1:29 PM
There's an even more adverse effect to the way closures are allocated:
sharplab.io#v2:EYLgxg9gT...

Because the same closure is reused for different calls, you can end up extending the lifetime of some of your objects without realizing it.
September 26, 2025 at 1:28 PM
Congrats to Microsoft on this new release, I've been using it for a few weeks now and it really feels great.

Note that Resharper is already compatible, if you want to try it!
September 10, 2025 at 7:01 AM
Not entirely sure what I'm going to do with all that money.
September 3, 2025 at 10:02 AM
I just discovered that whenever you create a closure in a generic C# method, the closure is also generic even when it's not needed.

This is very frustrating to me because generics cause performance issues in Resharper (see bsky.app/profile/kevi...)

sharplab.io#v2:EYLgxg9gT...
September 1, 2025 at 2:55 PM
Yeah, gonna be one of those days.
September 1, 2025 at 8:12 AM
Monday
September 1, 2025 at 8:10 AM
Try Warp 😉
August 29, 2025 at 7:56 AM
To help reduce the number of UI freezes caused by Resharper, I built an internal tool to measure UI responsiveness.
Here, you can see the improvement between the current 2025.1 version (on the left) and the upcoming 2025.2 version (on the right) with out-of-process enabled.
July 28, 2025 at 12:58 PM
It's worse in Visual Studio because there are hundreds of assemblies to iterate over, so the lock is held for a significant amount of time. To add insult to injury, the R# framework relies *a lot* on generic types. In total, that's 21 seconds of CPU time wasted on startup!
July 23, 2025 at 10:31 AM
As I work on Resharper performance, I learn about limitations of .NET (at least, .NET Framework) that I wasn't aware of. Here, I shaved 1 second of CPU time on startup by... removing a call to Array.Empty<T>.
July 23, 2025 at 10:31 AM
Working on performance, it's a lot of time wasted on dead-ends and getting the impression of making no progress, and then suddenly managing to shave 10 seconds of CPU time off R# startup.
July 18, 2025 at 3:21 PM
One thing I like about working on a new codebase is finding all those low-hanging fruits, optimizations that have a significant impact for a relatively low effort.

Here, before/after, squashing ~140 MB of heap allocations from Resharper licensing code.
July 8, 2025 at 10:17 AM
I'm experimenting with interfacing dnlib with my Silhouette library. The .NET profiling API provides almost no helper at all to manipulate IL, it just exposes the method body as a binary blob. Having access to dnlib greatly simplifies IL rewriting.

github.com/kevingosse/S...
July 5, 2025 at 3:00 PM
The core issue is that it tries to "improve" the code without staying relevant to the edit that was made. Here, I edited the method to add the call to "Path.GetFileNameWithoutExtension". In response, the AI suggests to change the dictionary assignation. It's completely unrelated!
June 11, 2025 at 8:20 AM
Today I needed some information about method jitting in R#, but ETW was missing some bits. It was a nice opportunity to test Silhouette, and it only took me a few hours to write a profiler to retrieve everything I needed.

(and yes, it's XML, I'm old 👴)
May 23, 2025 at 3:46 PM
Time to make it official: starting Monday, I'll be leaving Datadog and joining JetBrains as principal engineer 🎉
I'll be working on various topics, but one of my first responsibilities will be to improve the performance of Resharper, which is a thrilling but frightening challenge.
May 15, 2025 at 9:56 AM
I'm starting to prepare my talk for @updateconference.bsky.social in Krakow next May.

krakow.updateconference.net/en/2025/sche...

First (and most important step), using AI to build a concept for the illustration (with cats), then commissioning a pixel-art artist for the final drawing.
March 15, 2025 at 5:59 PM
It's hard to focus on your work when @andrewlock.bsky.social knows your weakness
February 18, 2025 at 2:25 PM
Yes, they're the same thing 😉 Frozen segments were renamed into NonGC heap

github.com/dotnet/runti...
February 17, 2025 at 7:34 PM
I migrated ClipPing from WPF to @avaloniaui.net + NativeAOT. Commit size is still surprising to me, but the overall memory usage has been massively reduced.
December 30, 2024 at 1:43 PM