{"id":238666,"date":"2022-07-11T08:30:51","date_gmt":"2022-07-11T15:30:51","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=238666"},"modified":"2022-07-11T09:16:45","modified_gmt":"2022-07-11T16:16:45","slug":"vs2022-performance-enhancements-git-branch-switching","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/vs2022-performance-enhancements-git-branch-switching\/","title":{"rendered":"VS2022 Performance Enhancements: Git Branch Switching"},"content":{"rendered":"<p>Have you experienced delays when switching between your Git branches in Visual Studio? Did you have to wait for your solution and projects to reload after switching between branches in a Git repository? We are happy to announce performance enhancements to the branch switching experience in Visual Studio 2022.<\/p>\n<p><figure id=\"attachment_238667\" aria-labelledby=\"figcaption_attachment_238667\" class=\"wp-caption alignnone\" ><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/07\/Gif2.gif\"><img decoding=\"async\" class=\"wp-image-238667 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/07\/Gif2.gif\" alt=\"90% of branch switches are estimated to occur without solution reload\" width=\"1920\" height=\"1080\" \/><\/a><figcaption id=\"figcaption_attachment_238667\" class=\"wp-caption-text\"><span style=\"font-size: 10pt;\"><em>90% of branch switches in Visual Studio are now estimated to occur without a solution reload<\/em><\/span><\/figcaption><\/figure><\/p>\n<p>To benefit from the latest branch switching performance enhancements, download the latest preview version of Visual Studio.<\/p>\n<p style=\"text-align: center;\"><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/aka.ms\/vs2022preview\" target=\"_blank\">Download Visual Studio 2022 Preview<\/a><\/div><\/p>\n<p><div class=\"alert alert-primary\"><p class=\"alert-divider\"><i class=\"fabric-icon fabric-icon--Info\"><\/i><strong>Note: <\/strong><\/p>To get the most out of these branch switching performance enhancements, make sure to switch between branches utilizing the Git tooling inside of Visual Studio. To do that you can utilize any of the following options:<\/p>\n<ol>\n<li>The status bar<\/li>\n<li>The Git changes window<\/li>\n<li>The Git repository window<\/li>\n<\/ol>\n<p><figure id=\"attachment_238673\" aria-labelledby=\"figcaption_attachment_238673\" class=\"wp-caption aligncenter\" ><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/07\/Branch-switching-blog-Final.png\"><img decoding=\"async\" class=\"wp-image-238673 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/07\/Branch-switching-blog-Final.png\" alt=\"Switch between branches in Visual Studio\" width=\"1943\" height=\"1210\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/07\/Branch-switching-blog-Final.png 1943w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/07\/Branch-switching-blog-Final-300x187.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/07\/Branch-switching-blog-Final-1024x638.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/07\/Branch-switching-blog-Final-768x478.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/07\/Branch-switching-blog-Final-1536x957.png 1536w\" sizes=\"(max-width: 1943px) 100vw, 1943px\" \/><\/a><figcaption id=\"figcaption_attachment_238673\" class=\"wp-caption-text\"><span style=\"font-size: 10pt;\"><em>How to switch between Git branches in Visual Studio 2022<\/em><\/span><\/figcaption><\/figure><\/p>\n<p><\/div><\/p>\n<p>Utilizing the Git tooling to switch between branches in Visual Studio involves not only invoking the corresponding Git command for checking out a branch, but also involves invoking necessary project and solution reloads. These reloads can take longer depending on what&#8217;s involved. Given this, we have made improvements to 1)avoid reloading solutions for many scenarios by utilizing targeted in place solution updates 2)enhance the solution\/projects reload experiences by reducing their time and reducing any corresponding blocking operations.<\/p>\n<p><figure id=\"attachment_238678\" aria-labelledby=\"figcaption_attachment_238678\" class=\"wp-caption aligncenter\" ><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/07\/Gif1.gif\"><img decoding=\"async\" class=\"wp-image-238678 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/07\/Gif1.gif\" alt=\"30% improvement in solution reload time\" width=\"1920\" height=\"1080\" \/><\/a><figcaption id=\"figcaption_attachment_238678\" class=\"wp-caption-text\"><em><span style=\"font-size: 10pt;\">30% improvement in solution reload time<\/span><\/em><\/figcaption><\/figure><\/p>\n<p>We reduced the number of branch switches that need solution reloads by an estimate of 80%. For example, every time a team member used to add\/remove projects to\/from their branch, the rest of the team would most likely have experienced a solution reload when switching to or from this branch. As of 17.3 this scenario should no longer trigger a solution reload resulting in a quicker branch switching experience.<\/p>\n<p>We have also been able to speed up solution reloads by an average of 30%. Users who are switching between branches inside Visual Studio by utilizing the built in Git tooling will experience both performance gains; however, users who switch between branches using the command line or an external Git tool will only experience the 30% improvement in solution reload time.<\/p>\n<p>&nbsp;<\/p>\n<h3>Other recent performance enhancements<\/h3>\n<ul>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/vs2022-performance-enhancements-faster-c-development\/\">VS2022 Performance Enhancements: Faster C++ Development<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/supercharge-your-git-experience-in-vs\/\">Supercharge your Git experience in VS &#8211; Visual Studio Blog <\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/case-study-double-performance-in-under-30-minutes\/\">Case Study: Double performance in under 30 minutes &#8211; Visual Studio Blog <\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Let us know what you think<\/h3>\n<p>We have benefitted greatly from all the rich feedback we\u2019ve received from you \u2013 thank you! We hope you\u2019ll help us continue to improve by letting us know what you think by taking the following quick survey:<\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/www.surveymonkey.com\/r\/B8G7NRM?v5\" target=\"_blank\">Share Your Feedback<\/a><\/div><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you experienced delays when switching between your Git branches in Visual Studio? Did you have to wait for your solution and projects to reload after switching between branches in a Git repository? We are happy to announce performance enhancements to the branch switching experience in Visual Studio 2022. To benefit from the latest branch [&hellip;]<\/p>\n","protected":false},"author":4322,"featured_media":255385,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[431,53],"class_list":["post-238666","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-git","tag-performance"],"acf":[],"blog_post_summary":"<p>Have you experienced delays when switching between your Git branches in Visual Studio? Did you have to wait for your solution and projects to reload after switching between branches in a Git repository? We are happy to announce performance enhancements to the branch switching experience in Visual Studio 2022. To benefit from the latest branch [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/238666","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\/4322"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=238666"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/238666\/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=238666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=238666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=238666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}