VS2022 Performance Enhancements: Git Branch Switching

Taysser Gherfal

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.

90% of branch switches are estimated to occur without solution reload
90% of branch switches in Visual Studio are now estimated to occur without a solution reload

To benefit from the latest branch switching performance enhancements, download the latest preview version of Visual Studio.

Note:


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:

  1. The status bar
  2. The Git changes window
  3. The Git repository window

Switch between branches in Visual Studio
How to switch between Git branches in Visual Studio 2022

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’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.

30% improvement in solution reload time
30% improvement in solution reload time

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.

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.

 

Other recent performance enhancements

 

Let us know what you think

We have benefitted greatly from all the rich feedback we’ve received from you – thank you! We hope you’ll help us continue to improve by letting us know what you think by taking the following quick survey:

 

6 comments

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

  • Juliano Goncalves 0

    Looking forward to these massive performance gains, awesome job!

    Minor suggestion for future articles would be to make it a bit more clear about which version of VS will contain the changes, as people could end up thinking that these would be coming in the next patch releases which is not the case. There is only a single mention closer to the bottom of the article that says “As of 17.3…” but it is otherwise hard to spot.

  • André Slupik 1

    The most annoying for me is how the UI prevents me from switching branches while debugging. If I can do it from the command line, the UI should let me do it as well.

  • Weihan Li 0

    The git branch info in VS would not change when I checkout to another branch outside of VS

  • Eli Black 0

    Yay! ^_^

    BTW, for future reference, is there someone at MS that I can email when encountering VS performance issues? I found vssolutionload@microsoft.com, but it looks like it’s no longer monitored.

    • NAYANA SRIKANTHMicrosoft employee 1

      Hi There,

      An optimal way to gain the attention is to a report a problem. Instructions for reporting a problem is here Link

Feedback usabilla icon