Visual Studio 2022 – 17.5 Performance Enhancements
We are excited to announce that Visual Studio 2022 17.5 offers a range of performance enhancements that significantly improve the speed and responsiveness of the product in the following main areas:
- Build Acceleration for .NET SDK style projects
- External Sources Decompilation
- Thread Window
- Razor & C# experience
- Quick Add Item
- Code Coverage
You can download Visual Studio 2022 from the Visual Studio downloads page or upgrade your existing installation by following the Update Visual Studio page.
Build Acceleration for .NET SDK style projects
Build Acceleration for .NET SDK style projects are an opt-in feature that directs Visual Studio to only build projects that had modifications while skipping projects that were unchanged. Enabling Build Acceleration can reduce incremental build times by up to 80% for SDK-style .NET projects.
For further details and instructions on enabling/disabling Build Acceleration, please visit the link.
External Sources De-compilation
You’ll also find de-compiling large modules in 17.5 is up to 10 times faster! Decompiling .NET libraries on a call stack demonstrates that it is now possible to de-compile multiple modules in less time than it took to de-compile a single module in version 17.4. These improvements would likely make debugging and troubleshooting issues more efficient.
The performance of the threads window has been vastly improved in 17.5! The response time of the window now scales very well when debugging applications with large number of threads. This animation demonstrates the speed of 17.5 compared to 17.4 when debugging an application with around 200 threads.
Quick Add Item
17.5 introduces a faster way to add files and folders to your solution! The “New Item” menu command (Or Ctrl+Shift+A shortcut) brings up a compact dialog where you provide the name and extension of the file you want to add, and a file with matching template will get added to your project. Compared to the dialog that shows all templates, the compact dialog is much faster and lets you get the job done with fewer gestures. The new dialog also allows multiple files and folders to be created with a single invocation of the dialog, giving a further boost to developer productivity!
You can learn more about the quick Add Item experience by watching a short video.
Razor & C# Experience
To address the feedback about productivity and performance surrounding Razor we’ve added support for code actions in Razor files, including some helpful shortcuts like “Remove Tag,” “Encode image in Base64,” and “Insert Image height/width.”
We have made significant improvement to the performance of dynamic code coverage by addressing an issue related to inlining. Our investigation showed that dynamic instrumentation was globally disabling inlining. For instance, running coverage tests on the Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests project in Roslyn executes over 1 million code blocks while only around 400,000 blocks are instrumented to test code coverage. To optimize this, we now enable inlining when neither the caller nor the callee are under code coverage. This change has led to a significant boost in the speed of dynamic code coverage. Code coverage tests on the Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests project in Roslyn run over 35% faster in 17.5!
Tell us what you think!
We hope these performance enhancements make your development work efficient and enjoyable. Feedback from developers like you is very important for us to improve the product and meet your expectations. We welcome your feedback on Visual studio performance. The preferred approach is using the Report-a-problem tool. You can also leave comments below.
Visual Studio 2022 version 17.5.1 was release back on February 28th, 2023. This article is a little late, no?
This is just a duplicate of the old article. Looks like someone has to keep up with KPIs.
We have a blog schedule and are writing about different features of 17.5 GA over time.
Many good stuff in this release. Build Acceleration for .NET SDK style projects is my favorite. Great article with graphics and gifs. Thanks Nayana !
Has the memory leak in RoslynCodeAnalysisService been fixed yet? 17.4.2 it is still eating up to 60% of CPU and 6+ GBs of memory.
Thanks for checking! We have made a few CPU related fixes across 17.5 and 17.6 including https://github.com/dotnet/roslyn/pull/67100 that came in 17.5. If you already have a feedback around your particular instance or could file one with a perf trace, we can confirm if that is already fixed.
Please fix this, because I can’t upgrade to VS 2022 until you do, I don’t care how fast it is.
Thank you Nayana, for your and your team’s hard work! Performance improvements in Visual Studio are very appreciated. Thank you for making Visual Studio better!
The main performance issue I’ve had with VS is slow Intellisense. Searching “slow” on developercommunity.visualstudio.com suggests that many have the same issue: “Intellisense is slow”, “Intellisense slow”, “Text editor extremely slow”…
Inexplicably, the dev team seems to be tackling everything performance related other than Intellisense. Faster startup, faster builds etc are appreciated, but why is the team ignoring what is an obvious issue for many?
Manually disabling all the unnecessary analyzers and generators through my .csproj speeds things up significantly, but it’s still sluggish.
You’re going to continue getting complaints about performance in your surveys so long as you ignore Intellisense perf.
Our development teams are aware of the Intellisense performance issues and are working on improving it, including faster startup and build times. Thank you for your feedback and patience as we strive to provide a better experience.