当前位置:网站首页>Solution to slow compilation speed of Xcode
Solution to slow compilation speed of Xcode
2022-04-23 07:22:00 【dotphoenix】
Recently, when developing a large project, I encountered a headache , Due to the large number of project codes , Compile links every time 1 About minutes , Debugging is a waste of time , So I studied how to improve the speed of compiling links , Share it here .
There are three main ways to improve the speed of compiling Links :
1. Improve XCode Number of threads used at compile time
defaults write com.apple.Xcode PBXNumberOfParallelBuildSubtasks 4
XCode The default usage is CPU The same number of cores , But because of the IO Operation is often better than CPU More operations , Therefore, appropriately increasing the number of threads can speed up the compilation speed to a certain extent . I use 4 Nuclear CPU, Change the number of threads to 8 The post compilation speed is slightly improved .
2. take Debug Information Format Change it to DWARF
In the project corresponding to Target Of Build Settings in , find Debug Information Format This one , take Debug At the time of the DWARF with dSYM file Change it to DWARF.
This item sets whether to add debugging information to the executable file , Change it to DWARF after , If the program crashes , The function stack corresponding to the crash location will not be output , But because of Debug In mode, you can XCode View debugging information in , So instead of DWARF It doesn't matter much . After this change , It can greatly improve the compilation speed .
3. take Build Active Architecture Only Change it to Yes
In the project corresponding to Target Of Build Settings in , find Build Active Architecture Only This one , take Debug At the time of the No Change it to Yes.
This item sets whether to compile only the version of the current schema , If No, Will compile versions of all schemas . It should be noted that , This option in the Release Mode must be Yes, Otherwise, it will be published ipa Will not work on some devices . After this change , It can significantly improve the compilation speed .
After setting the above three items , Compile time from 1 Minutes or so to 10 About seconds , Therefore, the effect is quite obvious .
版权声明
本文为[dotphoenix]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230609059585.html
边栏推荐
猜你喜欢
【2021年新书推荐】Practical Node-RED Programming
第2章 Pytorch基础1
[point cloud series] sg-gan: advantageous self attention GCN for point cloud topological parts generation
MySQL的安装与配置——详细教程
Machine learning III: classification prediction based on logistic regression
【2021年新书推荐】Practical IoT Hacking
Write a wechat double open gadget to your girlfriend
【点云系列】 A Rotation-Invariant Framework for Deep Point Cloud Analysis
[2021 book recommendation] learn winui 3.0
[point cloud series] pnp-3d: a plug and play for 3D point clouds
随机推荐
机器学习 三: 基于逻辑回归的分类预测
[recommendation of new books in 2021] practical IOT hacking
PyTorch 13. 嵌套函数和闭包(狗头)
Chapter 4 pytoch data processing toolbox
[2021 book recommendation] red hat rhcsa 8 cert Guide: ex200
Gobang games
素数求解的n种境界
【2021年新书推荐】Professional Azure SQL Managed Database Administration
1.1 PyTorch和神经网络
Machine learning II: logistic regression classification based on Iris data set
【点云系列】PnP-3D: A Plug-and-Play for 3D Point Clouds
DCMTK(DCM4CHE)与DICOOGLE协同工作
机器学习 二:基于鸢尾花(iris)数据集的逻辑回归分类
机器学习——PCA与LDA
[recommendation for new books in 2021] professional azure SQL managed database administration
Visual Studio 2019安装与使用
Pytorch trains the basic process of a network in five steps
Cancel remote dependency and use local dependency
ArcGIS license server administrator cannot start the workaround
第8章 生成式深度学习