Workaround: Slow version control operations when using VS 2010 with an older server

Updated 2/25/2010. Thanks to Shaun and Amos for their recommended changes!

One of the new features of TFS 2010 is automatic version control proxy configuration. The first time a version control operation is executed, the client contacts the server and asks for proxy configuration information. If no proxy is available for the client, it will ask again after 24 hours have passed.

To allow proxies to be auto-configured by location, the client provides to the server its “site name” from Active Directory. This data is used by the server to determine which of several proxies to assign the client to. Clients in Germany can be assigned to the Germany proxy, and clients in South Africa to the South Africa proxy. This is the same mechanism that Windows uses with the Add Printer Wizard to show printers physically close to you.

Unfortunately, there is a bug in the automatic proxy configuration mechanism of the VS 2010 client when communicating with a 2005/2008 server. When used against an older server, no query can be made to auto-configure a proxy because the server does not support the functionality. But the site name from Active Directory is still retrieved, on every version control operation from the list below.

  • Get
  • Merge
  • Unshelve
  • Edit
  • Delete
  • Undelete
  • Rename
  • Undo
  • Add
  • Branch
  • Resolve

In all cases, there is some performance penalty for retrieving this data from LDAP. But in some cases it can be particularly bad. One customer reported a delay of 8 to 9 minutes to retrieve the site name from Active Directory. Fortunately, there is a workaround available for this issue. If you are using VS 2010 against a TFS 2005/2008 server, you may notice an increase in performance by disabling automatic proxy configuration through the use of the following registry settings.

Check your version control proxy settings in Visual Studio first, by going to Tools –> Options –> Source Control –> Visual Studio Team Foundation Server. If you have a proxy configured, your proxy server protocol, name, and port will be available there, and you should not be affected by this issue. (If you want to be 100% sure, instructions for verifying your proxy settings are below.)

No version control proxy:

These settings are for users who are not using a proxy server. All files are downloaded from the central TFS server directly.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\TeamFoundation\SourceControl\Proxy]
"Enabled"="False"
"Url"="https://dummy.example.com/"
"AutoConfigured"="False"

Manually configured version control proxy:

You should not have to take any further action. If you like, you can inspect your registry settings to ensure they look like those below. (If you happen to have “LastCheckTime” or “LastConfigureTime” values in addition to these values, that’s normal and they are harmless.)

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\TeamFoundation\SourceControl\Proxy]
"Enabled"="True"
"Url"="https://yourversioncontrolproxy:8081/"
"AutoConfigured"="False"

Installing the workaround settings

Copy/paste the text into Notepad, save it as a .reg file, and execute it. You’ll be prompted to authorize the merging of this data into the registry. Be sure to restart Visual Studio for the changes to take effect.

Comments

  • Anonymous
    September 23, 2010
    Thank you for this solution.  Worked perfectly for me.  The odd thing is that 2 of my coworkers are on the same scenario and they don't have an issue with it.  

  • Anonymous
    February 03, 2011
    What is the reasoning that there is a URL entry included with the no version control proxy option? point it somewhere that doesn't exist? "Url"="dummy.example.com/" ? mine is empty with the other two options set to false, does that mean I'm ok or not?