Xcode compilation speed Slow processing method _ios

Source: Internet
Author: User

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

1. Increase the number of threads used in Xcode compilation

Copy Code code as follows:

Defaults Write Com.apple.Xcode pbxnumberofparallelbuildsubtasks 4

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

2. Change the debug information format to dwarf

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

This setting is whether to add debugging information to the executable file, after the dwarf, if the program crashes, you will not be able to output the crash location of the function stack, but because the debug mode can be in Xcode to view debugging information, so change to dwarf impact is not significant. After this change, you can significantly increase the speed of compilation.

3. Change build Active architecture to Yes

In the build settings corresponding to target in the project, find the item "Build Active Architecture" only, change debug to Yes.

This setting is to compile only the version of the current schema, and if no, all schema versions 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, you can significantly improve the compilation speed.

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

The above mentioned is the entire content of this article, I hope you can enjoy.

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.