Visual Studio 2022 – 17.5 Performance Enhancements

Nayana Srikanth

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.

Image Build Acceleration for faster incremental builds latest

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. 

Decompilation

Threads Window 

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. 

Thread Window

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.” 

Text Description automatically generated

Code Coverage 

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! 

Image ezgif com resize 3

 

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. 

12 comments

Discussion is closed. Login to edit/delete existing comments.

  • Michael Lopez 0

    Visual Studio 2022 version 17.5.1 was release back on February 28th, 2023. This article is a little late, no?

    • Stanislav Silin 0

      This is just a duplicate of the old article. Looks like someone has to keep up with KPIs.

      • Nayana SrikanthMicrosoft employee 4

        We have a blog schedule and are writing about different features of 17.5 GA over time.

        • mathieu prevot 3

          Many good stuff in this release. Build Acceleration for .NET SDK style projects is my favorite. Great article with graphics and gifs. Thanks Nayana !

  • Steven Silvers 1

    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.

    • Arun ChanderMicrosoft employee 3

      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.

  • Aaron Viviano 2

    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!

  • Jeremy TCD 4

    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.

    • Nayana SrikanthMicrosoft employee 0

      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.

  • Ken Kohler 0

    I have Visual Studio 17.5.4 installed and do NOT see the changes for Add New Item.

  • Ken Kohler 0

    The only change I want regarding code coverage is to fix the significant issue of not reporting code coverage for async methods.

    Scenario:
    I have a class with methods that a that are both async and not async, with unit test coverage for everything. Using the option to analyze code coverage, all unit tests are executed. All unit tests pass. Going through the code coverage window, I can pull up the source code that shows what lines have code coverage highlighted in blue (covered) or red (not covered). All code is covered as expected. The issue is that the code coverage window is NOT showing async methods. This also means that nuget packages like coverlet.collector are also not reporting code coverage for the async methods.

    There is definitely an issue here. Unfortunately, I have been unable to create a small project to use as an example for this in order to submit a bug. I have seen this issue with 17.x releases of Visual Studio. New releases do NOT appear to fix the issue.

    Has anyone else had this problem? Is there a fix for this?

Feedback usabilla icon