November 22nd, 2023

Visual Studio 2022 – 17.8 Performance Enhancements

Nayana Srikanth
Senior Product Manager

 

Version 17.8 welcomes an array of exhilarating performance enhancements, including Improved Razor/Blazor Responsiveness, Enhanced F5 Speed, Optimized IntelliSense for C++ Unreal Engine and Build Acceleration for Non-SDK style .NET Projects.  At the heart of these changes is our commitment to enhancing performance, providing an ideal platform for a coding experience that is not only seamless but also highly productive. Embrace these improvements for a more efficient coding journey. Get ready for an exciting experience! 

Improved Razor/Blazor Responsiveness

Solutions using Razor and Blazor will experience better responsiveness. We achieved this by significantly reducing memory allocations during cross-process communications between Visual Studio and Roslyn. We tested the OrchardCore solution, and the results are impressive. To open the solution and get Razor intellisense ready, we allocate about 1.4GB less memory. Fewer heap allocations mean less work for the garbage collector, which results in improved responsiveness. 

Enhanced F5 Speed 

We’ve substantially enhanced F5 performance for native projects by optimizing how breakpoints get set up. The improvements seen by any given project depends on the number of files with breakpoints, the number of DLLs with symbols, etc.  Additionally, we’ve optimized the PDB loading process for Windows applications, reducing the time required to load a PDB once it’s located.  In our testing, these optimizations delivered a remarkable 20% speed improvement for Unreal Editor projects. 

Image debuglaunchbp

Optimized IntelliSense for C++ Unreal Engine 

We’ve made improvements to the speed with which IntelliSense and colorization become available after opening a previously opened C++ file. We have always cached IntelliSense state for an opened file. In 17.8, we’ve restructured the reading from cache, such that the most critical information, including colorization and the highlighting of selected references, are computed first. This optimization helps you get productive sooner. 

Image Intellisense New

Build Acceleration for Non-SDK style .NET Projects 

Visual Studio 17.8 extends Build Acceleration to managed applications targeting the non-SDK style projects (e.g. projects targeting .NET Framework 4.8 or lower) providing a substantial impact on build times. To enable, set an msbuild project property as follows:  

 <Project> 

        <PropertyGroup>  

              <AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>

       </PropertyGroup>  

</Project>   

This builds on the success introduced in 17.5 for SDK-style projects, reducing incremental build times significantly.  

In our internal testing with in-house solutions, we noticed up to a 50% improvement in incremental build times.  However, the actual improvement depends on the state of projects when the build begins.  Specifically, the fewer the projects that have been modified in comparison to the total projects in the solution, the greater the improvement. The actual extent of improvement you experience will depend on the specific characteristics of your project and its modifications. 

We value your opinion!  

We believe these performance enhancements will significantly improve your development experience, making it more efficient and enjoyable. Your feedback is crucial in helping us enhance the product and meet your expectations. We encourage you to provide feedback with us via Developer Community: report any bugs or issues via Report-a-Problem and share your suggestions.  Alternatively, feel free to leave your comments below. We appreciate your input and look forward to continuously improving Visual Studio with your valuable insights. 

 

 

 

Author

Nayana Srikanth
Senior Product Manager

20 comments

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

  • Jay Davidson

    This new version still has the (intermittent) problem of hanging when you open a solution/project. I updated yesterday and It just happened – hung for ~ 10 mins. AND then Task Manager locked up the computer trying to kill the VS2022 process!! Had to do a cold reboot!

  • Nathan Ferreira

    What about to support other important languages such as Rust and Dart inside VS? And at least add support to Flutter inside VS2022.

  • Daniel Silver · Edited

    Hello, I have a project which extensively uses SSE, AVX2 and AVX512 intrinsics. With this update, my code is throwing exceptions due to invalid instructions. The compiler is generating very invalid code using registers greater than ymm15. Take this code, for example:

    <code>

    You can see the MSVC compiler has emitted AVX2 code using registers ymm16 and ymm17. This is totally invalid as the AVX2 spec has only 16 ymm registers.

    Here is another...

    Read more
  • Eugene Ivanoff

    Triple quotes still do not work in Razor Editor

  • Mike-E

    Thank you for all your efforts to improve. 🙏🦃 It would be great to see you work on addressing 40+-second build times for a single key press in Blazor projects:
    https://github.com/dotnet/razor/issues/6919#issuecomment-1702455259

    This problem has been increasing with the more Razor that I add to my solution. Thank you for your consideration.

  • Gopi Ch

    Is there any plan for reducing the build time in VS ??

  • Johan Visser

    I found that after updating Visual Studio or updating 1 or more extensions, opening my solution takes twice as long the first time.
    After that it is back to normal.

    • Drew NoakesMicrosoft employee

      Hi Johan. That’s not unexpected. VS upgrades and changes to the set of installed extensions commonly cause caches to be invalidated, and they need to be rebuilt on the next launch.

  • Stuart Ballard

    Speaking of build improvements, my biggest pet peeve with VS for a couple decades now is that if you build a solution and there's a compile error in one project, it will still try to build all the other projects that depend on the broken one, which is at best a complete waste of time and at worst introduces a ton of nonsense errors claiming that methods don't exist when they clearly do (because they...

    Read more
    • Drew NoakesMicrosoft employee · Edited

      Great suggestion. I’ve got two links for you:

      – Firstly, a feedback ticket that you can vote on.
      – Secondly, the StopOnFirstBuildError VS extension that will achieve what you want.

  • Michael Taylor

    I'm baffled with the newer terminology being used in regards to the build acceleration documentation and I cannot be the only one struggling with this. When I read about build acceleration it ultimately talks about enabling the `AccelerateBuildsInVisualStudio` property (previously only available with .NET 5+ SDK projects). I have been using SDK-projects for years on my class library projects targeting .NET Framework and .NET 6+. It just works. My understanding of build acceleration is...

    Read more
    • Drew NoakesMicrosoft employee · Edited

      Hi Michael,

      Thanks for taking the time to share your thoughts and experience. I'll do my best to help.

      Using SDK-style projects to target multiple frameworks is a valid and supported scenario that works well with Build Acceleration. You're hitting an issue that can happen when you target earlier than .NET 5 (including .NET Standard). There's nothing to worry about here. The guidance is just to set <ProduceReferenceAssembly>true</ProduceReferenceAssembly> in your project, unconditionally. Then Build Acceleration will be...

      Read more
      • Michael Taylor

        Thank you Drew. Yes I read about adding the `ProduceReferenceAssembly` property to resolve the issue and I started to do that. But I was curious about two things:

        1. The discussion around this property (and reference assemblies) is clearly for those who are waist deep in .NET internals and not for a .NET developer. I don't understand what a reference assembly is, why it was enabled for .NET 5+ projects but not for .NET Framework projects...

        Read more
      • Drew NoakesMicrosoft employee

        Hi Michael, I hope the PR I linked includes details for both your questions. If not I can extend those docs. The short answer is 1) it speeds up your builds, and 2) we tried changing the default for old frameworks too, and backed it out due to rare edge cases. We take backwards compatibility very seriously, though you are incredibly unlikely to see any issues from the feature.

    • Jackson DavisMicrosoft employee · Edited

      Michael, the new Build Acceleration feature discussed above only applies to non-sdk legacy projects and should not require ProduceReferenceAssembly to be set to true. Is your class library an SDK style project that is using the target framework to target net472? I am checking with the dev that wrote that to see if that is missing functionality.

      Thanks

      Jackson Davis – MSFT

      • Michael Taylor

        Yes it is an SDK-style class library. We multi-target net472, net6 and net8.