您使用了哪些策略来缩短大型项目的构建时间?

What strategies have you used to improve build times on large projects?(您使用了哪些策略来缩短大型项目的构建时间?)

本文介绍了您使用了哪些策略来缩短大型项目的构建时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经参与过一个 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?

推荐答案

  1. 转发声明
  2. pimpl 成语
  3. 预编译头文件
  4. 并行编译(例如 Visual Studio 的 MPCL 插件).
  5. 分布式编译(例如 Incredibuild for Visual Studio).
  6. 增量构建
  7. 在几个项目"中拆分构建,因此如果不需要,不要编译所有代码.

[稍后编辑]8. 购买速度更快的机器.

[Later Edit] 8. Buy faster machines.

这篇关于您使用了哪些策略来缩短大型项目的构建时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:您使用了哪些策略来缩短大型项目的构建时间?