加快构建时间的方法? (C#/非托管 C++)
我目前正在开发的一个遗留应用程序需要大约 2 小时才能构建。 该项目大约有 170 个项目,其中 150 个左右是非托管 C++,另外 30 个是 C#.Net 2.0。
对于缩短此类项目的构建时间有哪些建议?
A legacy app I am working on currenty takes ~2hours to build. The project has about 170 projects with 150 or so being unmanaged C++ and the other 30 C#.Net 2.0.
What are some suggestions on ways to improve build times for something like this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可以尝试分布式构建系统 Incredibuild:http://www.xoreax.com/visual_studio.htm
You may try the distributed build system Incredibuild: http://www.xoreax.com/visual_studio.htm
您可以使用 lint 之类的工具来查看您的文件中是否有多余的包含文件c++ 项目。
Games from Within 上还有一篇关于此主题的精彩文章。
You could use a tool like lint to see if you have redundant include files in your c++ projects.
There is also a great article on this subject at Games from Within.
为项目制定多个解决方案,仅包含项目的相关子集,并为发布等留下一个超级解决方案。
Make multiple solutions for the project that only include relevant subsets of the projects and leave one super solution for releases etc.
专注于 C++ 项目 - 它们几乎肯定是构建过程中最耗时的项目。
有关缩短 C++ 构建时间的一些技巧:
除此之外,如果您谈论的是 2 小时的构建时间,通常还有一个简单、便宜(从整体上看)的解决方案:
Focus on the C++ projects - they are almost guaranteed to be the largest time drains for building.
Some tips on getting the C++ build times down:
Aside from that, if you're talking 2 hour build times, often there is a simple, cheap (in a big picture way) solution, as well:
如果您在需要构建的每台计算机上安装 IncrediBuild,它将在所有计算机之间分配构建过程。
如果您确实想仅使用硬件来解决问题,您可以设置一些仅用作 IncrediBuild 客户端的专用计算机。
在不同的规模上,确保您的每个项目都具有正确配置的预编译标头。
If you install IncrediBuild on every machine that needs to build it, it distributes the build process among all of the machines.
If you really want to just throw hardware at the problem you can set up a few dedicated machines that serve only as IncrediBuild clients.
On a different scale, make sure your every project has pre-compiled headers configured correctly.