The Wire · Showcase
RUNTIME ASYNC GETS MEMORY WIN, ROSLYN KILLS RECURSIVE FILE WATCH FOOTGUN
By RepoJournal · Filed · About .NET
The JIT is cutting allocations in ValueTask-backed async callables while Roslyn patches a file watcher bug that could recurse into your entire filesystem.
Runtime shipped three JIT wins overnight that matter for async workloads. First, cached ValueTask continuations [1] eliminate heap allocations when async methods suspend without allocating, a common case the runtime async callable thunk was botching before. Second, the JIT stopped making unsafe local copies when devirtualizing boxed interface calls [2], a bug that could return interior pointers to dead stack memory if the callee uses UnscopedRef. Third, the importer decoupled DoNotRegister from liveness analysis [3] so async functions stop getting unnecessarily marked as non-enregisterable, letting the optimizer breathe. All three land in main today and compound for real-world throughput gains. On the Roslyn side, file watchers were always recursive even for single files [6], which could recursively watch your entire filesystem if you pinned a file in the root. That's fixed. Roslyn also shipped crash dump detection for RunTests [7] so vstest hangs surface as actual test failures in Azure DevOps instead of silent XML voids. The Rope struct enumerator [8] removes iterator allocations in equals and hash code comparisons by replacing yield return with a stack-based tree walk, benefiting any code that compares or hashes source text. MSBuild continues normal dependency flow from Roslyn [4] and NuGet [5].
Action items
- → Review async method performance in main - JIT improvements land today dotnet/runtime [monitor]
- → Verify file watcher setup doesn't pin root files after Roslyn update dotnet/roslyn [plan]
- → Update to latest Roslyn for crash dump visibility in CI dotnet/roslyn [plan]
References
- [1] Cache continuation used for runtime async callable value task thunks ↗ dotnet/runtime
- [2] JIT: don't make local copy when devirtualizing boxed interface call (#128270) dotnet/runtime
- [3] JIT: Decouple "DoNotEnregister" from liveness ↗ dotnet/runtime
- [4] [main] Update dependencies from dotnet/roslyn (#13797) dotnet/msbuild
- [5] [main] Update dependencies from nuget/nuget.client ↗ dotnet/msbuild
- [6] Use non-recursive file watches when watching individual files ↗ dotnet/roslyn
- [7] Add crash/hang dump detection to RunTests ↗ dotnet/roslyn
- [8] Optimized Rope Equals and GetHashCode by replacing Rope's `IEnumerable<char>` iterator with struct `Enumerator` ↗ dotnet/roslyn
FAQ
- What changed in .NET on May 19, 2026?
- The JIT is cutting allocations in ValueTask-backed async callables while Roslyn patches a file watcher bug that could recurse into your entire filesystem.
- What should .NET teams do about it?
- Review async method performance in main - JIT improvements land today • Verify file watcher setup doesn't pin root files after Roslyn update • Update to latest Roslyn for crash dump visibility in CI
- Which .NET repositories shipped on May 19, 2026?
- dotnet/runtime, dotnet/msbuild, dotnet/roslyn