Visual Studio 2022 – 17.6 Performance Enhancements
Visual Studio 2022 17.6 introduces exciting performance enhancements in several key areas. These improvements aim to enhance the overall software development experience by boosting productivity, reducing wait times, and providing a smoother workflow.
The performance enhancements in Visual Studio 2022 17.6 include:
- Solution Open
- Solution Close
- Git File History
- Git Branch Switches
- Lightbulb Improvements
- Performance Profiler stop collection.
Significant enhancements have been made to Solution-Open performance and Solution Filters, particularly for larger projects. Testing with the Chromium repository, which consists of 11000 projects, showed a remarkable 8x faster cached project load time, saving 3.5 minutes in Solution Load time. The cached Chromium solution now loads in approximately 30 seconds. Additionally, for a Solution Filters scenario with 63 projects, Chromium loads in just 20 seconds, which is 3x faster. These enhancements greatly benefit larger projects, enhancing productivity and reducing loading times.
Enhancements have been made to the Solution-Close process, which notably accelerates closing a solution with C++ projects. These improvements provide a 20% to 50% speed boost in closing solutions, depending on their size, with the most significant performance gains observed in larger projects (1000+ projects). For instance, in Chromium projects, the improvements result in a 50% acceleration, saving around 20 seconds of time.
We are pleased to announce that the Git History feature in Visual Studio has been enhanced to provide faster loading times for file and folder scenarios. Git repositories with longer history and more time between commits will see greater speed improvements. We’re excited to share that our measurements indicate a 42% improvement in the Git public repository.
We’ve further reduced the time it takes to switch between git branches in Visual Studio by optimizing file system changes detection and processing. Additionally, we’ve enhanced the way Visual Studio handles calls to git for this specific case.
The lightbulb/code actions have been greatly improved through comprehensive redesign of the diagnostics and code analysis architecture. We have focused on optimizing all components involved in bringing up a lightbulb through a combination of low/medium/high level fixes.
- Low-level fixes included limiting tree walks, improving string handling, optimizing source text handling, reducing allocations, and optimizing data structure-level optimizations in the diagnostics code paths.
- Medium-level fixes included cancelling background diagnostics (squiggles) when computing Lightbulb diagnostics, optimizing background indexing, limiting analyzers that are applicable per document, addressing inefficiencies in several 1st party/2nd party analyzers like PublicAPI analyzer, and improving our caching model.
- High-level fixes included a complete overhaul of the diagnostics pipeline to answer span-oriented questions, infer which analyzers are applicable to run on specific spans, and deprioritize slow analyzers based on historical run.
We have made substantial enhancements to the performance of both the CPU and memory, specifically when dealing with extensive source files. We have successfully minimized the number of progress bar cycles required for the Lightbulb scenario in a large source file. Previously, it took approximately 8 to 17 cycles, but now we have reduced it to less than one cycle, as illustrated in the above gif.
The stop collection feature of the Performance Profiler has undergone performance improvements recently. These enhancements include implementing parallel NGEN PDB creation, parallel C# metadata scraping, and NGEN PDB caching in the symbol cache. As a result, metadata loading time and debug symbol loading time for NGEN PDBs have significantly decreased.
The stop collection now runs approximately 3.5 times faster when generating and almost 15 times faster when using cached values (which are always used if available). We’ve tested this using a 10-second trace in Visual Studio, and version 17.6 demonstrates a considerably faster performance than previous versions 17.5 and 17.4.
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.