VS2022 Performance Enhancements: Faster C++ Development

David Li

Introduction

Building on top of our performance wins in earlier releases of VS2022, we are excited to announce additional improvements in Visual Studio 2022 17.3! Whether you are a game developer, work with large codebases, or have a small C++ project, your C++ development experience in Visual Studio 17.3 will feel even faster!

In this blog, I will share the incredible speed improvements you will experience when VS indexes your codebase and colorizes your C++ code for the first time. In addition, learn about the new Go to All experience that will show results as you type.

Testing Methodology

Measuring indexing and time to colorization, we used an Unreal Engine 5 blank C++ project on a desktop with an Intel Core i7-9700 CPU @ 3Ghz, 64GB RAM, and an SSD. For indexing improvements, we benchmarked using both UE5 and the more than 300,000 file Chromium repo. The tests took place on Visual Studio 2019 16.11 and Visual Studio 2022 17.2 and 17.3. For both scenarios, we used system logs to track the duration of the operations.

Results

Population (Indexing) Improvements

Image indexchromium

In Visual Studio 2019 16.11, it takes roughly 26 minutes for the Chromium repo to fully index. In Visual Studio 2022 17.3, waiting for indexing to finish will only take a bit over 6 minutes, a 4.17X speed up. When indexing a large solution like the Chromium repo for the first time, you will save up to 20 minutes with the latest version of Visual Studio.

Image indexue5

When getting to code in a new Unreal Engine 5 solution, you will see a huge improvement in the latest version of VS2022 versus VS2019. In VS2019 16.11, fully indexing a brand-new C++ UE5 solution took 144 seconds. When using VS2022 17.3, fully indexing the same UE5 solution is now 2X faster at 72 seconds. Whether you are creating a new UE5 project or cloning from an existing repo, your code will index much faster in 17.3.

Time to Colorization

Image colorue5

Building on top of the improvements in VS2022 17.2, time to colorization is even faster in Visual Studio 2022 17.3. Compared to VS2019 16.11, you will see your UE5 code colorize from a cold start in 7.6 seconds, a 4.3X improvement.

Go To Responsiveness

In Visual Studio 2022 17.3, your Go to All experience will feel faster! Previously, results appeared after you stopped typing. In the new experience, results will show as you type. You will now spend less time getting the result you desire.

Before

Image gotobefore

After

Image gotoafter

In addition to the new Go to All experience, you can now search and interact with code more efficiently with Contextual Code Previews in our All-In-One Search experience. For more information, please see this blog.

Git Branch Switching

In addition to C++ and search improvements, we have also significantly improved the branch switching experience. Please refer to this blog for more information.

 

Feedback Wanted!

Your feedback through Developer Community, surveys, and social media channels has made these improvements possible. We thank you for your valuable comments. These enhancements are a continuation of our focus on improving productivity for game developers. Throughout the Visual Studio 2022 development cycle, we will continue to make improvements like ones detailed in this blogpost. If you are a game developer, let us know your thoughts in our 2022 Visual Studio Game Developer Survey.

In addition, please continue to help shape the development of Visual Studio by talking to us in the comments below, on Twitter (@VisualC), or via email at visualcpp@microsoft.com

Upgrade to Visual Studio 2022

Download the latest version of Visual Studio 2022 to take advantage of these productivity benefits today!

2 comments

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

  • Dwayne Robinson 0

    My biggest gripe with Go to All or Goto File wasn’t the perf (mind you, I appreciate that it’s faster) but rather that there was this delay before resorting the entries. So, often times I’d see the item I wanted in the list (even though it’s still partially populating), then start to double-click the item, only for it to resort and dynamically change out from under my mouse 😒; and thus I end up opening a completely different file. I haven’t updated to the new VS yet, but I hope this is fixed or maybe mitigated some by the perf improvements, because I really don’t want the active choice to change under my current hovering mouse cursor, even if a higher priority and better match would be found. Thanks David.

    • David LiMicrosoft employee 0

      Thanks Dwayne, please try the new experience and let us know. The new way of sorting results should be responsive enough that items will not change under your mouse.

Feedback usabilla icon