Xcode 快速索引永远 [英] Xcode swift indexing forever

查看:25
本文介绍了Xcode 快速索引永远的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用 swift 和 Xcode 6 (Beta 3) 开发 iOS 应用.

I'm currently developing an iOS app using swift and Xcode 6 (Beta 3).

到目前为止一切都很好,但现在随着我的项目的增长,Xcode 突然开始索引,它一次又一次地这样做,使 Xcode 几乎无法使用.

Everything went fine so far but now as my project grows, Xcode suddenly began indexing and it does that again and again, making Xcode nearly unusable.

我在网上搜索了类似的问题并尝试了解决方案,但没有一个有帮助.即使禁用索引过程(defaults write com.apple.dt.Xcode IDEIndexDisable 1)也不会阻止 Xcode 这样做.

I have searched the web for similar problems and tried the solutions but none of them did help. Even disabling the indexing process (defaults write com.apple.dt.Xcode IDEIndexDisable 1) does not stop Xcode to do that.

在建立索引时,我的 CPU 使用率高达 300% 以上,导致风扇以最高速度运行.

While indexing, my CPU usage goes up to 300%+, causing the fans to run at highest speed.

在活动监视器中有几个名为swift"的任务,每个任务占用大约 1GB 内存.

In Activity Monitor there are several tasks named "swift" taking up about 1GB memory each.

推荐答案

已解决:我从项目中删除了最近添加的文件,问题消失了.然后我开始逐个添加文件,直到问题再次出现.所以我找到了导致问题的文件.然后我从该文件中删除了最近添加的代码,问题再次消失了.

Solved it: I deleted the most recently added files from the project and the problem disappeared. Then I started to add back the files, one by one until the problem reappeared. So I found the file causing the problem. Then I deleted the most recently added code from that file and again, the problem disappeared.

那样,我找到了一段负责该行为的代码.

That way, I found a piece of code which was responsible for that behavior.

这篇关于Xcode 快速索引永远的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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