XCode Compilation speed is slow

Source: Internet
Author: User

XCode Compilation speed is slow

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

1. Increase the number of threads used for XCode Compilation

Defaults write com. apple. Xcode PBXNumberOfParallelBuildSubtasks 4

XCode uses the same thread as the number of CPU cores by default for compilation. However, since the number of I/O operations in the compilation process is usually more than that in the CPU, therefore, appropriately increasing the number of threads can speed up compilation to a certain extent.

 

2. Change the Debug Information Format to DWARF.

In the Build Settings corresponding to the Target of the project, find the Debug Information Format item and change the DWARF with dSYM file in Debug to DWARF.

This item sets whether to add debugging information to the executable file. If the program crashes, the function stack corresponding to the crash location cannot be output, however, in Debug mode, debugging information can be viewed in XCode, so changing to DWARF does not have much impact. After this item is changed, the Compilation speed can be greatly improved.

 

3. Change Build Active Architecture Only to Yes.

In the Build Settings corresponding to the Target of the project, find the Build Active Architecture Only option and change No in Debug to Yes.

This item sets whether to compile only the version of the current architecture. If it is No, it will compile the versions of all architectures. Note that this option must be Yes in Release mode; otherwise, published ipa will not run on some devices. After this item is changed, the Compilation speed can be significantly improved.

 

After setting the preceding three items, we believe that the compilation time will be much shorter.

Related Article

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.