如何在不进行任何项目修改的情况下加快xcode的构建? [英] How to speedup xcode builds without any project modifications?

查看:228
本文介绍了如何在不进行任何项目修改的情况下加快xcode的构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最新版本或XCode(3.2.1)在OS X 10.6上运行非常慢.

Last version or XCode (3.2.1) is running very slow on OS X 10.6.

您可以对Mac进行哪些调整,以加快Xcode的构建过程.

What kinds of tweaks can you do to your Mac in order to speedup Xcode build process.

我不是在寻找诸如如何重组项目之类的一般提示,只是在进行与环境相关的调整.

I'm not looking for general hints like how to restructure your projects, just tweaks that are related to environment.

例如,我记得在Windows for Visual Studio上,两个重要的改进是禁用了防病毒和NTFS的上次访问时间.

For example I remember that on Windows for Visual Studio two significant speedups are to disable antivirus and NTFS last access time.

所以我的目标是其他,而不是:硬件升级,项目结构修改或配置分布式构建.

So I'm aiming at something else than: hardware upgrades, project structure modifications or configuring distributed builds.

更新#1-也许限制cc1plus进程的数量可以帮助加快速度.我认为有一个环境变量可用于此目的,但我无法重定位此信息.

Update #1 - maybe limiting the number of cc1plus processes could help speeding up. I think there is an environment variable that can be used for this but I wasn't able to relocate this info.

推荐答案

我想我可以使用以下命令以适当的速度构建Xcode:

I think I may got Xcode to build at decent speed with this command:

# Xcode 3.x
defaults write com.apple.Xcode PBXNumberOfParallelBuildSubtasks 4

# Xcode 4.x
defaults write com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4

这将限制在构建时执行的进程数.在将其添加到我的机器(4核/3GB RAM)之前,构建过程比在单核上慢!

This will limit the number of processes executed when it does build. Before adding this to my machine (4 cores/3GB RAM) the build process was slower than on single core!

我认为XCode本身无法估算子任务的正确限制,因为它仅通过查看内核数量而忽略了您拥有的RAM数量来进行估算.

I think that XCode is not able to estimate the right limit of subtasks by itself because it does the estimate by looking only at your number of cores and ignoring the amount of RAM you have.

这篇关于如何在不进行任何项目修改的情况下加快xcode的构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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