{"id":244514,"date":"2023-08-14T11:00:53","date_gmt":"2023-08-14T18:00:53","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=244514"},"modified":"2023-09-26T09:10:29","modified_gmt":"2023-09-26T16:10:29","slug":"visual-studio-2022-17-7-performance-enhancements","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/visual-studio-2022-17-7-performance-enhancements\/","title":{"rendered":"Visual Studio 2022 \u2013 17.7 Performance Enhancements"},"content":{"rendered":"<p><span class=\"TextRun SCXW96436686 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW96436686 BCX8\">Visual Studio 2022 17.7 introduces a set of exciting performance improvements that cater to key areas like <\/span><\/span><span class=\"TextRun SCXW96436686 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW96436686 BCX8\"><strong>F5 Speed<\/strong>, <strong>Enhanced Light Bulb Performance in C#<\/strong>, <strong>improved memory consumption in C# spell checker<\/strong>, <\/span><\/span><span data-contrast=\"none\"><strong>C++ Unreal Engine \u2013 IntelliSense optimization, Solution Explorer<\/strong>, <\/span><span class=\"TextRun SCXW96436686 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW96436686 BCX8\"><strong>Find in Files<\/strong> and much more.<\/span><\/span><span class=\"TextRun SCXW96436686 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW96436686 BCX8\">\u00a0 <span class=\"NormalTextRun CommentHighlightRest SCXW138505752 BCX8\">Our key theme is to elevate the <\/span><span class=\"NormalTextRun CommentHighlightRest SCXW138505752 BCX8\">performance <\/span><span class=\"NormalTextRun CommentHighlightRest SCXW138505752 BCX8\">of Visual Studio and t<\/span>hese performance enhancements pave the way for a seamless and productive coding journey in Visual Studio 2022 17.7. Embrace the power of these upgrades and experience a new level of development efficiency. Happy coding!<\/span><\/span><span class=\"EOP SCXW96436686 BCX8\" data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p aria-level=\"1\"><span data-contrast=\"none\"><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/visualstudio.microsoft.com\/downloads\/\" target=\"_blank\">Download Visual Studio 2022<\/a><\/div><\/span><\/p>\n<h3 aria-level=\"1\"><span data-contrast=\"none\">Enhanced F5 Speed<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">The F5 experience has been improved by significantly optimizing the performance of opening PDBs (Program database files), resulting in a 4-second improvement in the time it takes to display the Unreal Editor project selection screen. This improvement particularly benefits debugging native code, but managed debugging with non-Portable PDBs will also experience advantages.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Furthermore, we have optimized the F5 path to better parallelize and load debugging components. For the initial F5 (cold F5), we anticipate a 5-10% improvement in the time it takes to start the debugger and launch the process, based on telemetry from an experiment especially for the initial F5.\u00a0 In a test with Unreal Editor, when launched within the debugger the project selection screen came up 21% faster.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/debugger.png\"><img decoding=\"async\" class=\"alignnone wp-image-244515\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/debugger.png\" alt=\"Image debugger\" width=\"593\" height=\"334\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/debugger.png 800w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/debugger-300x169.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/debugger-768x432.png 768w\" sizes=\"(max-width: 593px) 100vw, 593px\" \/><\/a><\/p>\n<h3 aria-level=\"1\"><\/h3>\n<h3><span data-contrast=\"none\">Enhanced Light Bulb performance in C#<\/span><\/h3>\n<p><span data-contrast=\"auto\">Further performance enhancements to the light bulb feature in C#. With speed improvements to how Visual Studio determines what actions to show, fixing traditionally slow code fixes like Fix Formatting and Simplify Type Name is now faster than ever. Enjoy immediate suggestions and fixes, even in large documents or after making edits.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h3><span data-contrast=\"none\">I<\/span><span data-contrast=\"none\">mprove memory consumption in C# spell checker<\/span><\/h3>\n<p><span data-contrast=\"none\">The LSP (Language Server Protocol) for the C# spell checker underwent significant improvements. By implementing a more efficient data structure and enabling streaming support, we achieved a remarkable 90% reduction in the memory footprint of the JSON transferred between the LSP Server and LSP Client. This enhancement leads to faster performance, increased efficiency,<\/span> <span data-contrast=\"none\">streamlined communication, and improved scalability for the spell-checking functionality.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/image-1.png\"><img decoding=\"async\" class=\"alignnone wp-image-244516\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/image-1.png\" alt=\"Image image 1\" width=\"603\" height=\"301\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/image-1.png 1103w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/image-1-300x150.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/image-1-1024x512.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/image-1-768x384.png 768w\" sizes=\"(max-width: 603px) 100vw, 603px\" \/><\/a><\/p>\n<h3 aria-level=\"1\"><span data-contrast=\"none\">C++ Unreal Engine \u2013 IntelliSense optimization<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">In Unreal Engine projects, the time for IntelliSense and colorization to become ready in a newly opened C++ file has been significantly reduced. The generation of IntelliSense cache (IPCH) is now 30% faster in Unreal Engine 5.1 and 5.2 projects, and 15% faster in Unreal Engine 4.27 projects.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/UnrealEngine.png\"><img decoding=\"async\" class=\"alignnone wp-image-244517\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/UnrealEngine.png\" alt=\"Image UnrealEngine\" width=\"610\" height=\"150\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/UnrealEngine.png 716w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/UnrealEngine-300x74.png 300w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h3 aria-level=\"1\"><span data-contrast=\"none\">Dependencies tree in Solution Explorer<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"none\">T<\/span><span data-contrast=\"auto\">he &#8220;Dependencies&#8221; tree of SDK-style .NET projects underwent a complete rewrite with a focus on improving both performance and correctness. This update addressed several bugs and significantly enhanced the rendering speed when opening projects and making changes. As a result, when loading a project that has already been restored, you will no longer experience the issue of yellow triangles momentarily appearing in the tree and then disappearing a few seconds later. The revamped &#8220;Dependencies&#8221; tree provides a smoother and more reliable project loading experience for developers.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/17.7-dep-node-before-after.gif\"><img decoding=\"async\" class=\"alignnone wp-image-244518\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/17.7-dep-node-before-after.gif\" alt=\"Image 17 7 dep node before after\" width=\"857\" height=\"482\" \/><\/a><\/p>\n<h3 aria-level=\"1\"><span data-contrast=\"none\">Find in Files<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">The &#8220;Find in Files&#8221; search time has been greatly improved through the implementation of several techniques.\u00a0<\/span> <span data-contrast=\"auto\">These include reducing allocations through pooled objects, minimizing unnecessary file system API calls such as file existence and last write time checks, and decreasing exception throws for binary files. These optimizations enhance the search performance, efficiency, and overall user experience.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">In the previous version (17.6), searching for the text string &#8220;ToUpperInvariant&#8221; in all .cs files within the <\/span><a href=\"https:\/\/github.com\/dotnet\/roslyn\"><span data-contrast=\"none\">Roslyn code base<\/span><\/a> <span data-contrast=\"auto\">took 4.12 seconds. In 17.7 with the latest performance enhancements, the same search now completes in an impressive 2.12 seconds\u2014a nearly 50% reduction in search time!<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/FindInFilesPerf.gif\"><img decoding=\"async\" class=\"alignnone wp-image-244519\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/FindInFilesPerf.gif\" alt=\"Image FindInFilesPerf\" width=\"884\" height=\"589\" \/><\/a><\/p>\n<h3 aria-level=\"1\"><span data-contrast=\"none\">Runaway NuGet restore detection<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">Previously, the NuGet package restore operation occasionally encountered an issue where it would get stuck in a loop due to certain properties having cyclical nature. The automatic background restoration of projects&#8217; packages now includes a detection mechanism for runaway restores. The cyclic property causing endless loops is broken, and a message is displayed to alert users about the problem. This enhancement avoids wasted CPU usage and ensures a more responsive environment for developers.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h3 aria-level=\"1\"><span data-contrast=\"none\">ServiceHub &#8211; JIT reduction improvement<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">Visual Studio launches &#8220;ServiceHub&#8221; processes in the background which enable important functionalities, such as identity management, language services like IntelliSense etc. These processes launch behind the scenes when Visual Studio itself starts up or opens a solution. Hence it is important that the overhead from these processes is kept to a minimum. It was observed that JIT compilation of code in these processes was consuming non-trivial amount of CPU and IO. AppDomains within ServiceHub processes were restructured such that there was better code sharing and more precompilation of code. These changes resulted in remarkable reduction in JITing time during Visual Studio startup, leading to a smoother and faster user experience.\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h3 aria-level=\"1\"><span data-contrast=\"none\">Improving the fundamentals<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">Visual Studio has a continuous, data-driven focus on improving quality fundamentals such as crashes, freezes, excessive memory usage, etc. Recently new telemetry was brought online to provide insight on excessive CPU usage and allocation issues leading to unresponsiveness. These enhancements provide the Visual Studio team with deeper insights into Visual Studio&#8217;s performance, enabling more effective troubleshooting and optimization. As a result, over 160 performance issues have been fixed across the product in 17.7, including significant improvements to NuGet restore, Find in Files, and more optimal parallel loading of solutions. <\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h3><b><span data-contrast=\"none\">We value your opinion!<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:300,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">We believe these performance enhancements will significantly improve your development experience, making it more efficient and enjoyable. Your feedback is crucial in helping us enhance the product and meet your expectations. We encourage you to provide feedback with us via\u00a0<a href=\"https:\/\/developercommunity.visualstudio.com\/home\" target=\"_blank\" rel=\"noopener\">Developer Community<\/a>: report any bugs or issues via <\/span><a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/ide\/how-to-report-a-problem-with-visual-studio?view=vs-2022\"><span data-contrast=\"none\">Report-a-Problem<\/span><\/a><span data-contrast=\"auto\"> and\u00a0<a href=\"https:\/\/developercommunity.visualstudio.com\/report?space=8&amp;entry=suggestion\" target=\"_blank\" rel=\"noopener\">share your suggestions<\/a>.\u00a0 Alternatively, feel free to leave your comments below. We appreciate your input and look forward to continuously improving Visual Studio with your valuable insights.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:300,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio 2022 17.7 introduces a set of exciting performance improvements that cater to key areas like F5 Speed, Enhanced Light Bulb Performance in C#, improved memory consumption in C# spell checker, C++ Unreal Engine \u2013 IntelliSense optimization, Solution Explorer, Find in Files and much more.\u00a0 Our key theme is to elevate the performance of [&hellip;]<\/p>\n","protected":false},"author":105722,"featured_media":255385,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[6868,155],"tags":[],"class_list":["post-244514","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-performance","category-visual-studio"],"acf":[],"blog_post_summary":"<p>Visual Studio 2022 17.7 introduces a set of exciting performance improvements that cater to key areas like F5 Speed, Enhanced Light Bulb Performance in C#, improved memory consumption in C# spell checker, C++ Unreal Engine \u2013 IntelliSense optimization, Solution Explorer, Find in Files and much more.\u00a0 Our key theme is to elevate the performance of [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/244514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/105722"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=244514"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/244514\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/255385"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=244514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=244514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=244514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}