Visual Studio 2022 Performance: Faster C++ Source Code Indexing
Building on top of our performance wins in Visual Studio 2022 version 17.3, we are excited to announce additional improvements in version 17.4.
Whether you are a game developer, work with large codebases, or have solutions with many C++ projects, your development experience in Visual Studio 2022 17.4 will feel even faster.
In 17.4 we significantly reduced the time it takes to open a C++ project for the first time (cold load).
While working on these improvements, we constantly check our performance against real-life large projects, including some of our own, as well as several C++ codebases for popular games from our partner game studios.
Large C++ projects could see a 20-36% speed improvement over 17.3 when populating the source code database used for browsing and navigation.
When compared to VS 2019, the cumulative performance gains for this scenario should be between 2X-6X depending on the project structure and size.
In this post, we want to highlight the C++ project indexing scenario for the Gears of War source code and a generic Unreal Engine 5 starter project.
Hardware: AMD Ryzen PRO 3945WX 12/24, 128GB RAM, 2.5TB SSD, RTX 3080
Projects/source code: Gears of War, Unreal Engine 5 starter project, Chromium
Visual Studio: VS2019 v16.11 and VS2022 v17.4
For all scenarios, we used VS system events/logs to track the duration of the operations.
Let’s see the cumulative effect of all the improvements we made in this area for C++ projects, for the past year.
In Visual Studio 2019 16.11, it takes roughly 6½ minutes for Gears of War to fully index. In Visual Studio 2022 17.4, waiting for indexing to finish will only take a bit over 2½ minutes, resulting in a 2.5X speed up.
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 a bit over 2½ minutes. When using VS2022 17.4, fully indexing the same UE5 solution is now 2.7X faster at just 1 minute. Whether you are creating a new UE5 project or cloning from an existing repo, your code will index much faster in 17.4.
Pushing the limits
Few open-source projects reach the scale of Chromium with over 12,000 projects in one single Visual Studio solution, so naturally it’s an irresistible target for stress testing the components we’re improving. Let’s see how we did.
In Visual Studio 2019 16.11, it takes roughly 31 minutes for the Chromium repo to fully index. In Visual Studio 2022 17.4, waiting for indexing to finish will only take just 5 minutes, a 6X speed up. When indexing a large solution like the Chromium repo for the first time, you will save up to 26 minutes with the latest version of Visual Studio.
Try it out
Although everyone should see considerable improvements for these scenarios, the magnitude of the gains is dependent on your source code, project layout, include graph, etc. So, try it out on your codebase and let us know about your project load/parsing gains for IntelliSense start-up.
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 firstname.lastname@example.org
Upgrade to Visual Studio 2022
Download the latest version of Visual Studio 2022 to take advantage of these productivity benefits today!