{"id":30753,"date":"2022-07-11T16:04:16","date_gmt":"2022-07-11T16:04:16","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=30753"},"modified":"2023-02-02T19:09:44","modified_gmt":"2023-02-02T19:09:44","slug":"vs2022-performance-enhancements-faster-c-development","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/vs2022-performance-enhancements-faster-c-development\/","title":{"rendered":"VS2022 Performance Enhancements: Faster C++ Development"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>Building on top of our <a href=\"https:\/\/aka.ms\/VS2022CppPerf1\">performance wins<\/a> 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!<\/p>\n<p>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.<\/p>\n<h2>Testing Methodology<\/h2>\n<p>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.<\/p>\n<h2>Results<\/h2>\n<h2>Population (Indexing) Improvements<\/h2>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/indexchromium.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-30755\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/indexchromium.png\" alt=\"Image indexchromium\" width=\"2003\" height=\"1376\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/indexchromium.png 2003w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/indexchromium-300x206.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/indexchromium-1024x703.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/indexchromium-768x528.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/indexchromium-1536x1055.png 1536w\" sizes=\"(max-width: 2003px) 100vw, 2003px\" \/><\/a><\/p>\n<p>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.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/indexue5.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-30756\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/indexue5.png\" alt=\"Image indexue5\" width=\"1836\" height=\"1146\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/indexue5.png 1836w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/indexue5-300x187.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/indexue5-1024x639.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/indexue5-768x479.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/indexue5-1536x959.png 1536w\" sizes=\"(max-width: 1836px) 100vw, 1836px\" \/><\/a><\/p>\n<p>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.<\/p>\n<h2>Time to Colorization<\/h2>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/colorue5.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-30754\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/colorue5.png\" alt=\"Image colorue5\" width=\"2001\" height=\"1222\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/colorue5.png 2001w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/colorue5-300x183.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/colorue5-1024x625.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/colorue5-768x469.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/colorue5-1536x938.png 1536w\" sizes=\"(max-width: 2001px) 100vw, 2001px\" \/><\/a><\/p>\n<p>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.<\/p>\n<h2>Go To Responsiveness<\/h2>\n<p>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.<\/p>\n<p style=\"text-align: center;\"><strong><span style=\"font-size: 18pt;\">Before<\/span><\/strong><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/gotobefore.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-30766\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/gotobefore.gif\" alt=\"Image gotobefore\" width=\"454\" height=\"385\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><strong><span style=\"font-size: 18pt;\">After<\/span><\/strong><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/gotoafter.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-30767\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/07\/gotoafter.gif\" alt=\"Image gotoafter\" width=\"454\" height=\"385\" \/><\/a><\/p>\n<p>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 <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/sneak-peek-and-edit-your-code-while-you-search\/\">blog<\/a>.<\/p>\n<h2>Git Branch Switching<\/h2>\n<p>In addition to C++ and search improvements, we have also significantly improved the branch switching experience. Please refer to this <a href=\"https:\/\/aka.ms\/VS2022-BranchSwitchingPerformance\">blog<\/a> for more information.<\/p>\n<p>&nbsp;<\/p>\n<h2>Feedback Wanted!<\/h2>\n<p>Your feedback through <a href=\"https:\/\/developercommunity.visualstudio.com\/\">Developer Community<\/a>, surveys, and social media channels has made these improvements possible. We thank you for your valuable comments.\nThese 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, <a href=\"http:\/\/aka.ms\/VSGameDevSurvey\">let us know your thoughts in our 2022 Visual Studio Game Developer Survey<\/a>.<\/p>\n<p>In addition, please continue to help shape the development of Visual Studio by talking to us in the comments below, on Twitter (<a href=\"https:\/\/twitter.com\/visualc\">@VisualC<\/a>), or via email at <a href=\"mailto:visualcpp@microsoft.com\">visualcpp@microsoft.com<\/a><\/p>\n<h2>Upgrade to Visual Studio 2022<\/h2>\n<p><a href=\"https:\/\/visualstudio.microsoft.com\/downloads\/\">Download the latest version of Visual Studio 2022<\/a> to take advantage of these productivity benefits today!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":39811,"featured_media":29661,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,3927,218],"tags":[301,331,3922,66,3923],"class_list":["post-30753","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus","category-game-development","category-performance","tag-game","tag-game-development","tag-perf","tag-performance","tag-search"],"acf":[],"blog_post_summary":"<p>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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/30753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/39811"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=30753"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/30753\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/29661"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=30753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=30753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=30753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}