简体   繁体   English

何时使用XCode分布式构建功能

[英]When to use the XCode Distributed Build Feature

I work in a small iPhone development team, in our office, we have at least 4 copies of XCode running on the network at any one time. 我在一个小型iPhone开发团队工作,在我们的办公室里,我们在网络上至少有4个XCode副本一次运行。 Contemplating getting everyone to have it running. 考虑让每个人都让它运行。

We're networked together using a standard WIFI Switch, so network speed and latency isn't as good as wired network... 我们使用标准WIFI交换机联网,因此网络速度和延迟不如有线网络......

Just wondering, is there any real time gain to be had on using distributed builds? 只是想知道,使用分布式构建是否有任何实时收益? Once it passes the relevant data back and forth over the network. 一旦它通过网络来回传递相关数据。 At least for relatively small projects. 至少对于相对较小的项目。

it depends on your project, its dependencies, and the amount of data that must be transferred. 它取决于您的项目,其依赖项以及必须传输的数据量。

15-20 seconds is not terrible. 15-20秒并不可怕。 certainly, there is more work overall to be done. 当然,还有更多的工作要做。 it may be a good idea for everyone to farm it out to a very fast Mac Pro, rather than to each other if you're using dual cores (that info was not given). 如果你使用的是双核(没有给出信息),那么每个人都可以将它发送到非常快的Mac Pro,而不是彼此。

as far as project configuration: if you have a bunch of dependent libraries in your projects, then it may help to disable precompiled headers. 就项目配置而言:如果你的项目中有一堆依赖库,那么它可能有助于禁用预编译头文件。 much of the equation is the average number of dependencies, and the number of objects to generate. 等式的大部分是依赖关系的平均数量,以及要生成的对象数量。

at 15-20 seconds, it would help many developers to write so they optimize their build times before farming out. 在15-20秒,它将帮助许多开发人员编写,以便他们在耕种之前优化他们的构建时间。 if it were a few minutes, then you may want to jump straight into distributed builds with a 8 or 12 core. 如果只有几分钟,那么您可能希望直接跳转到具有8或12核心的分布式构建。

one easily overlooked aspect of slow builds on small projects: disable static analysis per build, and just run it manually every hour two, fixing every issue then. 在小型项目上缓慢构建的一个容易被忽视的方面:每个构建禁用静态分析,并且每小时两次手动运行它,然后修复每个问题。

otherwise, your project could probably be divided into smaller projects/libraries. 否则,您的项目可能会被划分为较小的项目/库。 chances are, you won't always be editing the same dependencies. 机会是,你不会总是编辑相同的依赖项。

assuming compilation, linking, etc are where the time is spent at this point: much of the rest falls into the typical issues involved with building c and c++ programs. 假设编译,链接等是在这一点花费时间的地方:其余大部分都属于构建c和c ++程序所涉及的典型问题。 minimize your dependencies and include graphs. 最小化您的依赖关系并包括图表。 it's actually quite easy to accomplish with objc; 使用objc实际上很容易实现; since much of the interfaces use objc-types, you can use forwards. 由于大多数接口都使用objc类型,因此可以使用前向。

if your library is small (eg less than 50 objects generated), then you may also gain a speedup by not using precompiled headers. 如果您的库很小(例如,生成的对象少于50个),那么您也可以通过不使用预编译的头来获得加速。 if everything already depends on your inclusion of 12 system frameworks included by the pch.... then try it in the next project. 如果一切都取决于你包含pch所包含的12个系统框架....那么在下一个项目中尝试它。

of course, you could just try timing a clean rebuild, a build with generated pch files, and several incremental builds in order to come to a conclusion. 当然,你可以尝试计划一个干净的重建,一个带有生成的pch文件的构建,以及几个增量构建,以便得出结论。

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

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