如何降低建设次/加快编译X code时间? [英] How to decrease build times / speed up compile time in XCode?

查看:125
本文介绍了如何降低建设次/加快编译X code时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么策略一般可以用于减少生成时间对任意x code项目?我在X code比策略最感兴趣。

我在做用X code iPhone发展,我的项目是慢慢变大。我觉得编译/链接阶段开始采取更多的比我想的时间。

I'm doing iPhone development using XCode, and my project is slowly getting bigger and bigger. I find the compile / link phases are starting to take more time than I'd like.

目前,我是:


  • 使用静态库,使之如此
    我的大部分code并不需
    编译每次我清理并生成
    我的主要项目

  • Using Static Libraries to make it so most of my code doesn't need to be compiled everytime I clean and build my main project

有从除去了大部分的资源我
应用,以及测试用硬
在iPhone codeD文件系统路径
模拟器只要有可能,所以我的
资源不必不断地
打包为我进行变更。

Have removed most resources from my application, and test with a hard coded file system path in the iPhone simulator whenever possible so my resources don't have to constantly be packaged as I make changes to them.

我注意到,检查依赖关系阶段似乎需要更长的时间比我想。任何提示,以减少这也将是AP preciated!

I've noticed that the "Checking Dependencies" phase seems to take longer than I'd like. Any tips to decrease that as well would be appreciated!

推荐答案

通常情况下,你可以做的事情最多是控制你的头文件包含。

Often, the largest thing you can do is to control your inclusion of header files.

包括源$ C ​​$ C额外的头文件大大减慢编译。这也往往会增加依赖性检查所需的时间。

Including "extra" header files in source code dramatically slows down the compilation. This also tends to increase the time required for dependency checking.

此外,使用而不是有头向前声明包括其他头可以大幅减少依赖关系的数量,并帮助所有的时序。

Also, using forward declaration instead of having headers include other headers can dramatically reduce the number of dependencies, and help all of your timings.

这篇关于如何降低建设次/加快编译X code时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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