The processing method of Xcode's slow compiling speed

Source: Internet
Author: User

There are three main ways to increase the speed of compiling links:

1. Increase the number of threads used when Xcode compiles

Copy the code code as follows:
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 am using 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 the project's build settings for target, locate the debug Information format and change the debug dwarf with DSYM file to dwarf.

This setting is whether to add debugging information to the executable file, after changing to dwarf, if the program crashes, you will not be able to output the function stack corresponding to the crash location, but because debug mode in Xcode can view debugging information, so the dwarf effect is not big. After this change is complete, the compilation speed can be greatly improved.

3. Change build Active Architecture only to Yes

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

This setting is whether to compile only the version of the current schema, and if no, all versions of the schema are compiled. It is important to note that this option must be yes in release mode, otherwise the published IPA will not run on some devices. After this change is complete, you can significantly increase the compilation speed.

After setting up the above three items, I believe the compilation time will be shortened a lot.

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.