XCode 6 GM: Constantly freezing / locking while editing Swift code

后端 未结 3 1309
北恋
北恋 2021-01-18 21:11

Since installing XCode 6 GM, it has been freezing and locking, showing the spinning wheel of death while I attempt to edit code that has syntax errors. Has anyone else seen

3条回答
  •  佛祖请我去吃肉
    2021-01-18 21:34

    I can't say any of these fixed the issue, but they alleviated the situation:

    1. I removed all playgrounds from the project tree. Saved them somewhere else.
    2. I removed all objectiveC code from the swift project (when possible). This Spinning-wheel, BTW, is a problem only in my swift projects. My other Objective-C-only projects are fine.
    3. It looks like it's the background indexing process which is taking all the CPU. Open "Activity Monitor" and see it right there at the top, using 360% CPU. Lowering the priority for this process helped as well (type in terminal):

      renice 10 -p [pid]

      Make sure to take the correct process id from Activity Monitor. The higher the number (should not exceed 19) the lower the priority.

    4. I make significant changes one at a time. It seems that the amount of errors in the file affect how many times and for how long the spinning wheel spins. It looks like some type of errors trigger it more often than others, but I'm not able to pin point which exactly.

    XCode had a similar indexing issue in previous versions (see this Xcode4 issue: How to disable indexing in Xcode 4?) which gives me the hope they will fix this issue sometime, hopefully soon...

提交回复
热议问题