简体   繁体   English

TFS 和 Visual Studio 缓慢签入

[英]TFS and Visual Studio slow check in

I'm not that familiar with Visual Studio or Team Foundation Server, but I have a development team that are complaining of very slow check ins (several minutes) in Visual Studio 2010.我对 Visual Studio 或 Team Foundation Server 不太熟悉,但我有一个开发团队抱怨 Visual Studio 2010 中的签入速度非常慢(几分钟)。

Examination of server and database do not reveal any problems The issue only happens in one particular solution.服务器和数据库的检查未发现任何问题 该问题仅发生在一种特定的解决方案中。 The issue can occur even for very small text files.即使对于非常小的文本文件,也会出现此问题。 The issue effects all users in the team.该问题会影响团队中的所有用户。

Where should I start troubleshooting?我应该从哪里开始故障排除?

edit Extra Information编辑额外信息

The size of the project is ~11.5GB, made up of 284,455 files and 52,186 folders.该项目的大小约为 11.5GB,由 284,455 个文件和 52,186 个文件夹组成。 These are accessed by ~10 users.这些由大约 10 个用户访问。 I think that, in terms of size, it is the largest project we have.我认为,就规模而言,这是我们拥有的最大项目。

I'm not exactly certain when the problem first manifested.我不确定问题第一次出现的时间。

I have tired to reproduce the issue on my machine without success.我已经厌倦了在我的机器上重现这个问题但没有成功。 So it looks like something to do with the local setup.所以它看起来与本地设置有关。 I've installed the plugins and extensions that the dev team is using.我已经安装了开发团队正在使用的插件和扩展。

The same developers don't have a problem with other projects.相同的开发人员在其他项目中没有问题。

For anyone experiencing large lag times when doing anything requiring TFS interaction (check out, check in, add new, rename, move, anything), there are probably many areas within TFS that could be causing the problem.对于在执行任何需要 TFS 交互(签出、签入、添加新的、重命名、移动等)时遇到大延迟时间的人来说,TFS 中可能有许多可能导致问题的区域。 In my case, even the simplest TFS interaction within Visual Studio involved a 5-10 second wait.就我而言,即使是 Visual Studio 中最简单的 TFS 交互也需要 5-10 秒的等待。 I decided to investigate it using Process Monitor, and discovered that every time TFS did anything , it would iterate over every single file in my TFS workspace, regardless of what projects were open, or whether Source Control Explorer or Team Explorer was open.我决定使用 Process Monitor 对其进行调查,并发现每次 TFS 执行任何操作时,它都会遍历我的 TFS 工作区中的每个文件,无论打开了哪些项目,或者是否打开了源代码管理资源管理器或团队资源管理器。 At the time, like @reticentKoala, I had 100,000+ files totalling over 17GB in my workspace.当时,就像@reticentKoala 一样,我的工作区中有 100,000 多个文件,总大小超过 17GB。

This is definitely a bug in the TFS client code (I'm running VS2013 and our IT people upgraded to whatever its associated TFS version is), but thankfully it reveals some workarounds.这绝对是 TFS 客户端代码中的一个错误(我正在运行 VS2013,我们的 IT 人员已升级到其关联的 TFS 版本),但幸运的是,它揭示了一些解决方法。

In my case, I do work on numerous projects, but generally only one or two at a time.就我而言,我确实参与了许多项目,但通常一次只有一两个。 By creating an 'Archive' folder in my normal work folder, and moving any projects I'm not actively working on into it, I was able to get TFS interacting at reasonable speeds again.通过在我的正常工作文件夹中创建一个“存档”文件夹,并将我没有积极参与的任何项目移动到其中,我能够再次以合理的速度让 TFS 交互。

If you are actively involved in a much larger project that you can't move pieces of around willy-nilly like that, I can only speculate on possible solutions, but the basic idea would be to just reduce either the number of files in your active workspace, or their presence on your local machine.如果你积极参与一个更大的项目,你不能像那样随意地移动碎片,我只能推测可能的解决方案,但基本的想法是减少你的活动中的文件数量工作区,或它们在本地计算机上的存在。

Have you checked the following post, in particular comment from Joel Rondeau: Suggestions for troubleshooting slow TFS server or: https://web.archive.org/web/20161104172214/http://www.lostapalooza.com/?p=150您是否查看过以下帖子,尤其是 Joel Rondeau 的评论: 对慢速 TFS 服务器进行故障排除的建议或: https ://web.archive.org/web/20161104172214/http://www.lostapalooza.com/?p =150

I would ensure no large BLOB files are actually stored in the TFS system as well.我会确保没有大型 BLOB 文件实际上也存储在 TFS 系统中。 Store links to them instead, and use the web access and team sites to do this.改为存储指向它们的链接,并使用 Web 访问和团队站点来执行此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM