当前位置:网站首页>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
边栏推荐
猜你喜欢

Use originpro express for free

微信小程序 使用wxml2canvas插件生成图片部分问题记录

Gee configuring local development environment

ArcGIS License Server Administrator 无法启动解决方法

Chapter 5 fundamentals of machine learning

【2021年新书推荐】Effortless App Development with Oracle Visual Builder

SSL/TLS应用示例
树莓派:双色LED灯实验

face_recognition人脸检测

WebView displays a blank due to a certificate problem
随机推荐
MySQL notes 3_ Restraint_ Primary key constraint
1.2 preliminary pytorch neural network
Pytorch模型保存与加载(示例)
Cancel remote dependency and use local dependency
Chapter 2 pytoch foundation 2
【点云系列】Multi-view Neural Human Rendering (NHR)
如何对多维矩阵进行标准化(基于numpy)
WebView displays a blank due to a certificate problem
torch.mm() torch.sparse.mm() torch.bmm() torch.mul() torch.matmul()的区别
How to standardize multidimensional matrix (based on numpy)
微信小程序 使用wxml2canvas插件生成图片部分问题记录
1.1 pytorch and neural network
[recommendation of new books in 2021] enterprise application development with C 9 and NET 5
【点云系列】Neural Opacity Point Cloud(NOPC)
[recommendation of new books in 2021] practical IOT hacking
【点云系列】SG-GAN: Adversarial Self-Attention GCN for Point Cloud Topological Parts Generation
Gobang games
【2021年新书推荐】Enterprise Application Development with C# 9 and .NET 5
Record WebView shows another empty pit
Three methods to realize the rotation of ImageView with its own center as the origin