News

So Just How Much Faster Is Visual Studio 2022 17.4?

Microsoft likes to tout performance improvements in its new dev tooling releases, with the recent Visual Studio 2022 17.4 being no exception.

The company penned what quite likely may be the largest blog post ever published in detailing in excruciating detail the performance improvements in .NET 7, released earlier this month along with VS 2022 v17.4. The upshot of the mind-bending tome is that .NET 7 is really fast (see "Everything Anyone Could Possibly Want to Know About .NET 7 Performance Improvements").

So how fast is the latest iteration of VS 2022?

Microsoft today (Nov. 21) published a blog post about significant improvements across common scenarios like find in files, branch switching, configuration changes, unit testing, C++ indexing and file saving. Here's a bullet-point summary:

  • Find and replace in files: This is now 3-4 times faster for things like doing a bulk replacement in a large solution, thanks to the dev team making incremental improvements in the last few releases. "For example, by avoiding opening modified files while preserving the global undo capabilities, Async save, maximizing usage of caching & indexing. Stay tuned for continued performance enhancements to the Find and Replace experience." Go here for more.
  • Faster indexing for C++ projects: Also significantly reduced is the time it takes to open a C++ project for the first time, perhaps up to 20-35 percent speed improvements over v17.3 when populating the source code index used for colorization and IntelliSense. For more on that, see "Visual Studio 2022 Performance: Faster C++ Source Code Indexing."
  • Reducing solution reloads during Git branch switches: Now, the number of branch switches that need solution reloads has been reduced by an estimated 80 percent, affecting operations like a developer's change getting merged and reaching the main branch. Previously, switching to or from that branch would require the rest of the team to undergo a solution reload. "This scenario should no longer prompt a solution reload resulting in a faster branch switching experience," Microsoft said. Read more about what Microsoft said here.
  • Faster Branch Switching in Animated Action
    [Click on image for larger, animated GIF view.] Faster Branch Switching in Animated Action (source: Microsoft).
  • .NET configuration switch responsiveness: Also improved were switching configuration operations like changing from Debug to Release, making the IDE much more responsive after such a switch. Some of the improvements were realized from reusing Roslyn projects used in switching configurations. Previously, Roslyn's views of a project were torn down and re-created from scratch despite few differences, requiring re-parsing of all source files in a project. "Now, configuration switches reuse the existing Roslyn project, updating it with only the small delta between configurations. Consequently, Roslyn can do much less work to bring IDE features up to date for the newly selected configuration, reducing wait time." Go here to see a table of improvements from v17.3 to v17.4.
  • Unit test performance: Here, gains were made across: parallel test discovery; efficient parallelization of test runs; and optimized communication between Visual Studio and test runner processes. Regarding the latter, the company said: "The test runner process connections are now established sooner. This means saving around 1 second on average per test assembly included in the test run. This leads to significant speed up for test runs involving a small number of tests. The communication between test runners and VS has also been tuned to be less chatty and more efficient. This leads to noticeable improvement especially for test discovery (up to 30 percent speed gain in many cases)."
  • Responsive file save "We moved most of the Save operations to a background thread allowing Visual Studio to stay responsive while documents are being saved. This enhancement is most noticeable when working on slow hard drives, network shares or editing exceptionally large files." More on that is available here.

"We use product telemetry from our GA releases to set baselines, run experiments in previews to test different solutions, measure changes in controlled lab environments for repeatable results, and dogfood builds daily to test our changes," Microsoft said. "While your mileage may vary, we believe there is something here for everyone."

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

Subscribe on YouTube