在Visual Studio 2005的速度很慢编译时间 [英] Very slow compile times on Visual Studio 2005

查看:206
本文介绍了在Visual Studio 2005的速度很慢编译时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在非常缓慢的编译时间,可以采取对双核2GHz的20多分钟以上,标配2G内存的机器。

We are getting very slow compile times, which can take upwards of 20+ minutes on dual core 2GHz, 2G Ram machines.

很多,这是由于我们的解决方案的规模已发展到70多个项目,以及VSS这是一个瓶颈本身,当你有大量的文件。 (换出VSS不是不幸一种选择,所以我不希望这陷入一个VSS bash)的

A lot of this is due to the size of our solution which has grown to 70+ projects, as well as VSS which is a bottle neck in itself when you have a lot of files. (swapping out VSS is not an option unfortunately, so I don't want this to descend into a VSS bash)

我们正在寻找合并的项目。我们也期待在有多个解决方案,以实现更大的关注分离和更快的编译时间为应用程序的每个元素。这个我可以看到将成为一个DLL地狱我们试图让事情保持同步。

We are looking at merging projects. We are also looking at having multiple solutions to achieve greater separation of concerns and quicker compile times for each element of the application. This I can see will become a DLL hell as we try to keep things in synch.

我想知道别人怎么队处理这个比例的问题,当你的code碱基达到你正在浪费了半天时间看状态栏提供编译的消息临界质量,你怎么办。

I am interested to know how other teams have dealt with this scaling issue, what do you do when your code base reaches a critical mass that you are wasting half the day watching the status bar deliver compile messages.

更新
我忘了提及这是一个C#的解决方案。感谢所有的C ++的建议,但它是一个几年以来,我不得不担心头。

UPDATE I neglected to mention this is a C# solution. Thanks for all the C++ suggestions, but it's been a few years since I've had to worry about headers.

编辑:

尼斯建议,迄今为止已帮助(不是说有没有其他好的建议之下,正是帮助)

Nice suggestions that have helped so far (not saying there aren't other nice suggestions below, just what has helped)


  • 新的3GHz的笔记本电脑 - 小惠金区管理时,会丢失利用的力量能创造奇迹
  • 编译过程中禁用防病毒
  • 编译过程中从VSS(其实网络)断开 - 我可以让我们完全取消VS-VSS集成并坚持使用VSS UI
  • New 3GHz laptop - the power of lost utilization works wonders when whinging to management
  • Disable Anti Virus during compile
  • 'Disconnecting' from VSS (actually the network) during compile - I may get us to remove VS-VSS integration altogether and stick to using the VSS UI

还没撕,吸食通过编译,但每一点帮助。

Still not rip-snorting through a compile, but every bit helps.

猎户座并在评论中提到,仿制药可以有一出戏也。从我的测试中确实出现是一个最小的性能损失,但没有高到足以确定 - 编译时间可能不一致由于光盘活动。由于时间的限制,我的测试没有包括许多泛型,或高达code,如将出现在现场的系统,这样就可能累积。我不会避免使用,他们都应该被使用仿制药,只是编译时的性能。

Orion did mention in a comment that generics may have a play also. From my tests there does appear to be a minimal performance hit, but not high enough to sure - compile times can be inconsistent due to disc activity. Due to time limitations, my tests didn't include as many Generics, or as much code, as would appear in live system, so that may accumulate. I wouldn't avoid using generics where they are supposed to be used, just for compile time performance

解决方法

根据需要,我们正在测试在建设新的解决方案的新的应用领域,引进最新的dll的做法,将它们集成到他们的大型解决方案时,我们很满意。

We are testing the practice of building new areas of the application in new solutions, importing in the latest dlls as required, them integrating them into the larger solution when we are happy with them.

我们还可以通过创建临时的解决方案,只是封装,我们需要努力的领域,和重返社会的code后扔掉他们做同样的现有code。我们需要权衡的时间,将采取对重返通过我们在开发过程中没有瑞普·凡·温克尔像快速重新编译经验获得这个时间code。

We may also do them same to existing code by creating temporary solutions that just encapsulate the areas we need to work on, and throwing them away after reintegrating the code. We need to weigh up the time it will take to reintegrate this code against the time we gain by not having Rip Van Winkle like experiences with rapid recompiling during development.

推荐答案

该Chromium.org团队列出了一些选项的加快构建(在这一点上大约一半的方式在页面):

The Chromium.org team listed several options for accelerating the build (at this point about half-way down the page):

在加速递减顺序:


      
  • 安装Microsoft修补程序 935225

  •   
  • 安装Microsoft修补程序 947315

  •   
  • 使用真正的多核处理器(如英特尔的Core Duo 2;不是奔腾4 HT)。

  •   
  • 使用3个平行的构建。在Visual Studio 2005中,你会发现在选择工具>选项...>项目和解决方案>生成和运行>并行工程的最大数量的建立

  •   
  • 禁用防病毒软件.ilk,.PDB,.CC,.h文件,只检查病毒在修改即可。禁用扫描您的源所在的目录。不要做任何愚蠢的事。

  •   
  • 存储,并建立第二个硬盘驱动器上的铬code。它不会真正加快构建但至少当你做gclient同步或构建您的计算机将保持响应。

  •   
  • 定期整理硬盘。

  •   
  • 禁用虚拟内存。

  •   
  • Install Microsoft hotfix 935225.
  • Install Microsoft hotfix 947315.
  • Use a true multicore processor (ie. an Intel Core Duo 2; not a Pentium 4 HT).
  • Use 3 parallel builds. In Visual Studio 2005, you will find the option in Tools > Options... > Projects and Solutions > Build and Run > maximum number of parallel project builds.
  • Disable your anti-virus software for .ilk, .pdb, .cc, .h files and only check for viruses on modify. Disable scanning the directory where your sources reside. Don't do anything stupid.
  • Store and build the Chromium code on a second hard drive. It won't really speed up the build but at least your computer will stay responsive when you do gclient sync or a build.
  • Defragment your hard drive regularly.
  • Disable virtual memory.

这篇关于在Visual Studio 2005的速度很慢编译时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆