您使用了哪些策略来缩短大型项目的构建时间?
我曾经参与过一个 C++ 项目,需要大约一个半小时才能完全重建.小型编辑、构建、测试周期大约需要 5 到 10 分钟.这是一场徒劳的噩梦.
I once worked on a C++ project that took about an hour and a half for a full rebuild. Small edit, build, test cycles took about 5 to 10 minutes. It was an unproductive nightmare.
您曾经经历过的最糟糕的构建时间是什么?
What is the worst build times you ever had to handle?
您使用了哪些策略来缩短大型项目的构建时间?
What strategies have you used to improve build times on large projects?
更新:
您认为所使用的语言在多大程度上是造成问题的原因?我认为 C++ 容易对大型项目产生大量依赖,这通常意味着即使是对源代码的简单更改也可能导致大规模重建.您认为哪种语言最能解决大型项目的依赖问题?
How much do you think the language used is to blame for the problem? I think C++ is prone to massive dependencies on large projects, which often means even simple changes to the source code can result in a massive rebuild. Which language do you think copes with large project dependency issues best?
推荐答案
- 转发声明
- pimpl 成语
- 预编译头文件
- 并行编译(例如 Visual Studio 的 MPCL 插件).
- 分布式编译(例如 Incredibuild for Visual Studio).
- 增量构建
- 在几个项目"中拆分构建,因此如果不需要,不要编译所有代码.
[稍后编辑]8. 购买速度更快的机器.
[Later Edit] 8. Buy faster machines.
相关文章