Xcode卡顿解决方案

2022-03-03  本文已影响0人  ios_暗夜行者

1、禁用indexing

defaults write com.apple.dt.XCode IDEIndexDisable 1

并重启Xcode。

(不是大神勿用哈,附还原命令)

defaults write com.apple.dt.XCode IDEIndexDisable 0

2、减少系统记录的最近打开数目数量

打开系统偏好设置——通用,把“最近使用的项目”由默认10,修改为5或者更少。

此时,不一定能立即加速,需要重新启动系统。

3、提高XCode编译时使用的线程数

defaults write com.apple.Xcode PBXNumberOfParallelBuildSubtasks 4

tips:

为 Xcode 开启动多线程:

defaults write 软件包名(即 Bundle identifier) PBXNumberOfParallelBuildSubtasks 线程数(即 cpu 核心数*2)

我的4核即8线程:

defaults write com.apple.dt.Xcode PBXNumberOfParallelBuildSubtasks 8

参考来源:https://www.cnblogs.com/songxing10000/p/5012604.html

上一篇 下一篇

猜你喜欢

热点阅读