Xcode 6.3代码完成太慢 [英] Xcode 6.3 code completion too slow

查看:118
本文介绍了Xcode 6.3代码完成太慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将Xcode更新到6.3版.我正在使用一些导入的Objective C代码在Swift中进行项目.我也使用Cocoapods.

I've just updated Xcode to version 6.3. I'm working on a project in Swift with some imported Objective C code. I also use Cocoapods.

我在Xcode 6.3 beta中遇到了相同的问题.我已经看过并尝试了所有其他StackOverflow答案,但是没有运气.

I had the same issue with the Xcode 6.3 beta. I've seen and tried all other StackOverflow answers with no luck.

到目前为止,我已经尝试过:

So far I've tried to:

  • 使用Xcode和/或Mac重新启动删除~/Library/Developer/Xcode/DerivedData~/Library/Caches/com.apple.dt.Xcode.

卸载Spotify.

不使用"+"串联运算符.

Not use the "+" concatenation operator.

将部署目标设置为8.1.

Set deployment's target to 8.1.

我应该提到,Objective C代码可以快速自动完成,并且在索引Swift代码之前也可以自动完成.弹出建议的 Esc 按钮的延迟时间相同.

I should mention that Objective C code autocompletes fast and that before indexing Swift code too. Esc button for popup suggestions works with the same delay.

推荐答案

在我的项目中,将Whole Module Optimization设置为Yes是一种解决方法.

Setting Whole Module Optimization to Yes is a workaround in my project.

在我的情况下,该项目有5个模块,在这里分别命名为A,B,C,D和E,其中的依存关系用图A-> B-> C-> D表示,而A到D均引用E.使用Xcode 6.3和6.3.1,可以很好地编译模块E和D,但是编译C所需的时间更长,而编译B和A所需的时间则更长,例如10分钟.更改项目设置后,只需不到一分钟的时间即可编译所有模块.它看起来比使用Xcode 6.2编译要快.

In my case, the project has 5 modules, named here A, B, C, D and E, where the dependency is diagramed A -> B -> C -> D, and each of A to D refers E. With Xcode 6.3 and 6.3.1, it is fine to compile modules E and D, but it takes longer to compile C, and much longer to compile B and A, like 10 mins. After I change the project setting, it takes less than a min to compile all the modules. It looks faster than compilation with Xcode 6.2.

参考:

  • Slow test file compilation in Swift 1.2, Xcode 6.3.1
  • https://devforums.apple.com/message/1128702#1128702

这篇关于Xcode 6.3代码完成太慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆