Speed up Xcode compile link speed (200%+)-xcode compilation Slow liquid

Source: Internet
Author: User

Recently in the development of a large project encountered a very headache problem, due to the project code more, each set up a contact 1 minutes. Waste Time debugging. So, some research on how to improve the speed of compiling links here for everyone to share.

To improve the speed of compiling and linking in the following three ways:

1. Increase the number of threads used by Xcode compilation

Defaults Write Com.apple.Xcode pbxnumberofparallelbuildsubtasks 4

Xcode is compiled by default using the same threads as the CPU cores, but because the IO operations in the compilation process tend to be more than the CPU, the appropriate number of lifting threads can speed up the compilation to some extent.

I use a 4-core CPU, the number of threads changed to 8 after the compilation speed slightly improved.


2. Change debug Information format to dwarf

In build settings for project target, locate the debug Information format and change the debug dwarf with DSYM file to dwarf.

This setting is whether to add debug information to the executable file, after changing to dwarf, assuming that the program crashes, you will not be able to output the corresponding crash location function stack, but because debug mode in Xcode can view debugging information. So the change of dwarf effect is not big.

After this change is complete, the compilation speed can be greatly improved.

It is important to note that the debug information format is changed to dwarf. Causes the value of a member variable in the Debug form to be unable to view the related class type. When you need to view these values, you can change the debug information format back to dwarf with DSYM File,clean (must) and then compile again.


3. Change build Active Architecture only to Yes

In build settings for project target, locate build Active Architecture only, and change the No to debug to Yes.

This setting is whether to compile only the version number of the current schema, assuming no, to compile the version number of all schemas. It is important to note that this option must be no in release mode. Otherwise, the published IPA will not execute on some devices.

After this change is complete, the compilation speed can be significantly improved.


After I have set the above three items. The compilation time is reduced from about 1 minutes to about 10 seconds, so the effect is quite obvious.


Suppose people think they are helpful to themselves. Also hope to help the top. Thank you:) Personal blog: http://blog.csdn.net/zhaoxy2850 This article address: http://blog.csdn.net/zhaoxy_thu/article/details/30073485 reprint please indicate the source. Thank you!


Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.

Speed up Xcode compile link speed (200%+)-xcode compilation Slow liquid

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.