Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS Renaming and deleting files is slow within Visual Studio 2013

Tags:

When, within Visual Studio 2013, I rename a file that is bound to TFS, Visual Studio pauses for around six seconds. When I'm refactoring for example, this wait is really annoying because it interrupts my flow.

I suspect that when I rename a file it is contacting TFS and doing the rename on the server which is the reason for the pause and my wait (edit - I don't think this is the case because it takes exactly 6 seconds when I don't have internet connectivity). If this is the reason, is there anyway to tell VS not to contact TFS until I check in? If it is not the reason for the slowing down of VS while I rename does anyone have any solutions to quicken up this process?

Edit - further information Visual Studio 2013 with update 2 and the free online version of TFS. The pause occurs with or without internet access. My machine is fairly fast (i5-2520M processor) with a SSD but it is 32 bit with 3gb of ram. I don't have many problems with memory though due to the SSD. In terms of add-ins I haven't installed any other than the default (I only recently upgraded to VS 2013)

like image 303
atreeon Avatar asked May 21 '14 00:05

atreeon


1 Answers

How big is your workspace? VS 2013 supports local workspaces, which allow you to do more when you are offline. However, if your workspace is large some operations can take a while when the files in it are scanned. This blog entry gives a good overview:

http://blogs.msdn.com/b/phkelley/archive/2013/05/29/server-workspaces-vs-local-workspaces.aspx

Here is some relevant text from that blog:

"Local workspaces have scalability limitations due to their use of the local workspace scanner which checks for edited items. Local workspaces are recommended for most of our customers, because most workspaces fit into the “small” or “medium” category in our view – that is, they have fewer than 50,000 files and folders. If your workspace has more than 50,000 items, you may experience performance problems or TF400030 errors as operations exceed 45 seconds in duration. In this case, splitting your workspace up into multiple smaller workspaces (perhaps one workspace per branch), or switching to server workspaces is recommended."

With your SSD I am not sure this is the problem, but it seems worth mentioning.

To change your workspace from local to server, or just to see whether you do in fact have a local workspace, select your workspace on the Team Explorer window and choose Manage Workspaces. Highlight your workspace and select Edit, then select Advanced. The type of workspace you have will be in the Location field.

like image 160
Ralph Avatar answered Oct 27 '22 12:10

Ralph