美文网首页
Xcode卡顿解决方案

Xcode卡顿解决方案

作者: ios_暗夜行者 | 来源:发表于2022-03-03 21:07 被阅读0次

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

相关文章

网友评论

      本文标题:Xcode卡顿解决方案

      本文链接:https://www.haomeiwen.com/subject/msburrtx.html