简体   繁体   中英

XCode is very slow to suggest autocompletion

When I code in Xcode on my MacBook Pro at work, autosuggestions seem to take 6-8 seconds. On my MacBook Air at home, they appear instantly.

Is there any reason for this? I don't see anything in Xcode's preferences that would cause this: Xcode首选项屏幕抓图

Any ideas here?

I have a shiny new iMac at work for development. It's an i7 proc, 8 GB memory. Indexing (and the things that go with it, like code sense or quick documentation) was taking a very long time (5 minutes for ~600 files). So was compilation.

The culprit turned out to be the corporate antivirus' on-access scan. I disabled on-access scanning and indexing dropped to around 5 seconds for the same number of files. Might be worth a shot if you have permissions to change antivirus settings.

On one of the developer blogs I follow (I can't find the link at the moment), the author said he regularly has to delete the DerivedData folder for his projects because of corruption that causes issues like this. Give that a try and see if it helps.

It's not SSD vs. non-SSD. My 2009 MacBook Pro shows suggestions nearly instantaneously.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM