Visual Studio 2022 – 17.10 Performance Enhancements

Ashok Kamath

We are excited to announce the latest update of Visual Studio 2022, which brings you a range of performance enhancements across various areas of the IDE. In this blog post, we will highlight some of the most notable improvements that you can experience in version 17.10, such as faster Windows Forms designer loading, faster Razor colorization, quicker solution loading, and reduced DLL overhead.

Image Picture1

Windows Forms designer loading speed

We heard from developers and partners that Windows Forms designer in projects targeting .NET Core 3.1 and up can be slow in loading up. In those scenarios the designer is loaded inside a separate process that runs alongside Visual Studio. The time to load this process can be long depending on the project’s dependencies. The impact is exacerbated when this designer process needs to be restarted under some conditions, such as when project references change. To improve the designer restart time, we have optimized how we prioritize and load assemblies into the designer process.

We are thrilled to announce that these enhancements have yielded remarkable design time performance improvements, ranging from 30% to an impressive 50% in a typical line of business application. We encourage you to explore the updated designer and share your invaluable feedback through the VS feedback channel so that we can continue improving Windows Forms designer performance.

Razor / C# colorization speed

Colorizing C# code is a complex operation. When there is C# code inside Razor pages, Razor delegates the task of colorization of such code to the C# language service (Roslyn). Our data shows that in most cases this colorization is very fast, but about 10% of cases can run into hundreds of milliseconds.

Performance improvement of Razor editing experience is a consistent focus of our engineers; in 17.10 they focused on the slow colorization. In their analysis, they found that Roslyn performs a significant amount of work which is not really needed in the specific context of colorization of the code (e.g. determining which variables are potentially null).

Optimizations have been put in such that Roslyn does just the work that is needed in the colorization context. Based on data from 17.10 Preview builds, we have noticed about 25% reduction in colorization time in the slowest cases. If you have noticed a lag before colorization within Razor, we hope you will notice the improvement in 17.10.

Faster .NET solution load

The speed of opening a solution is something that we improve with every update of Visual Studio and 17.10 is no different. Visual Studio uses something called an evaluation cache such that on every opening of a solution, MSBuild does not have to reevaluate all the dependencies.

In 17.10, the contents of this cache were heavily tuned such that loading it is more efficient. Our measurements with OrchardCore solution showed that the cache size dropped by nearly 50%. More importantly for our users, this resulted in a 10% reduction in the time to open that solution.

Improving the fundamentals

In 17.10, in addition to improving fundamentals such as CPU and memory usage, we also reduced the number of DLLs loaded in specific scenarios. With careful refactoring and tuning of code involved in loading .NET projects, we cut down the number of DLLs loaded by 10%! Loading DLLs can be slow on lower end machines with spinning disk hard drives. Moreover, DLL loads invite overhead from anti-virus software inspecting the DLLs, so we hope these improvements will help on slower machines.

Share your feedback and stay connected with Visual Studio!

We appreciate the time you’ve spent reporting issues and submitting suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

On behalf of the entire Visual Studio team, thanks for reading and Happy Coding!

Feedback usabilla icon