每次打开Xcode 9.2都会从头开始重新索引,即使没有任何更改 [英] Xcode 9.2 is re-indexing from scratch each time I open it, even if nothing changed
问题描述
我有一个项目(大项目),大约需要30分钟才能被Xcode索引.Xcode消耗了我3000%的CPU 100%.
I have a project (big project), that takes about 30 minutes to be indexed by Xcode. Xcode consumes 100% of my CPU for 30mn.
好吧,为什么不行,使用100%的CPU进行后台任务听起来有点不礼貌,但是为什么不呢?
OK why not, that sounds a bit rude to use 100% of the CPU for a background task, but why not.
现在,如果30分钟后,我退出Xcode,然后重新打开它,而又未触及项目的单个文件,它将再次开始索引30分钟.
Now, if after 30 minutes, I quit Xcode, and re-open it, without touching a single file of my project, it starts again to index for 30 minutes.
这是预期的行为吗?有办法解决吗?我不想关闭inedxing,我尝试了一下,并且代码完成是HS.
Is this the intended behaviour? Is there a way to fix it? I don't want to turn off inedxing, I tried it, and code completion is HS.
推荐答案
尝试将此标志添加到您的构建设置中.
Try adding this flag to your build settings.
Xfrontend -warn-long-expression-type-checking = 400
如果编译器需要较长时间来推导复杂的表达式,则会引起警告.
It will cause warning where the compiler take a long time to deduce a complex expression.
这可能会导致构建错误,当您找到慢速表达式然后删除构建标志后,该错误将会消失.
This may cause a build error which will go away after you find the slow expressions and then remove the build flag.
这篇关于每次打开Xcode 9.2都会从头开始重新索引,即使没有任何更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!