12

I've been using XCode 6.0.1 for a while now on a large-ish Swift project for iOS, and was wondering whether anyone else is experiencing these symptoms:

  • Sometimes it gets to the point that the spinner comes up on EVERY keystroke, and I have to wait 10 second before the next character appears in the editor.
  • Auto-complete takes up to a minute to auto-complete.
  • "Jump to Definition" takes up to 30 seconds to complete. Sometimes I've forgotten I asked for it, searched by text to find what I wanted, gone back to where I started from and then "Jump to Definition" kicks in.

I'm part of a development group of 3, and all three of us are experiencing the same behavior.

Peter K.
  • 8,028
  • 4
  • 48
  • 73
  • 2
    I had the same problems on the some of the Beta Versions. The Problem here was really simple: If the Coding-Text in one line was too long, everything stuck and was unusable to code. Check out which process hangs (should be 100% CPU usage). – derdida Oct 03 '14 at 12:03
  • 1
    I'm having the same issue, but when launching the app. If I type something, the app freezes for some seconds. – Phillip Oct 03 '14 at 12:03
  • 2
    That often happens to me when using long single line statements and expressions - see [this answer](http://stackoverflow.com/a/25813625/148357) for one of the cases when it happens. The solution is to split those long lines into multiple lines – Antonio Oct 03 '14 at 12:08
  • 1
    Maybe a similar problem to mine, a while ago: [Xcode Beta 3 Swift indexing forever](http://stackoverflow.com/questions/24782721/xcode-beta-3-swift-indexing-forever) – zisoft Oct 03 '14 at 12:11
  • @zisoft : Ouch! Too much code has gone by since it started. We had a case where the Archive build was crashing for no readily apparent reason. The issue seems to have been that the release build didn't like an enum. – Peter K. Oct 03 '14 at 12:14
  • 1
    I had (Still have but now happens less often) same issue after every time i opened Storyboard file as it had too many scenes . I finally had to divide my storyboard file into multiple parts. Its sad we have to spend our time on such issues – Bhumit Mehta Oct 03 '14 at 12:23
  • @Bhmuit this is why i suggest to let your Storyboard open in one existing tab in XCode. – derdida Oct 03 '14 at 13:53
  • I had the same issue, after I upgrade my macbook pro,no problem now. – gabbler Oct 03 '14 at 16:00
  • 1
    I used to have Antonio's problem (filed a bug on that as well), but as of 6 GM, it gracefully gives an internal compiler error instead. I filed a bug on the former, and think the latter, but should double check. You'd be forgiven for thinking a compiler should compile before it is released though. – Chris Conover Oct 14 '14 at 05:35
  • 1
    Jump to Defition is extremely slow in my Xcode 8.2.1 installation too. Looks like the same bugs come and go in Xcode. Let's see what happens to Tesla as the guy who led the Xcode development now works in Tesla... – Tapani Jan 24 '17 at 09:08
  • @Tapani And still no refactoring for Swift. Very, very sucky. We've moved to AppCode for some iOS development. – Peter K. Jan 24 '17 at 13:07

1 Answers1

3

Yeah, I had this problem - this is a duplicate of this:

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

I filed bug #18316444 and their response was:

Engineering has provided the following information:

We believe this issue has been addressed in the latest Xcode 6.1 beta.

This pre-release version of the Xcode 6.1 developer tools is required when developing for OS X Yosemite, and includes the Swift programming language. Xcode 6.1 beta runs on OS X Mavericks and OS X Yosemite Developer Preview.

Please test with this release, and update your bug report with the results.

Xcode 6.1 beta - Build 6A1042b

https://developer.apple.com/xcode/downloads/

Please let us know if that resolves the issue for you by updating your bug report.

I don't know if this will help or frustrate you, but the problem eventually went away for me. What I did end up doing though was having an open terminal ready will killall primed for SourceKit. I wish I knew what changed, it just did. One thing to check though, on early versions of XCode 6, I kept running out of pty terminals - it would leak, run out, and then SourceKit would "jam up". I had to up it to 512, I think (whatever the default was, I ended up doubling twice). I can't remember if that also worked around this issue, or if it was unaffected.

If you remain afflicted, you might consider editing with 6.1 and doing final builds on 6.0.x.

Community
  • 1
  • 1
Chris Conover
  • 8,889
  • 5
  • 52
  • 68
  • Thanks for the tip! We are in the middle of final release, but will definitely try this once this week is over. :-) – Peter K. Oct 14 '14 at 21:11
  • And now we're out, and had to update to 6.1 so we could check things on iOS 8.1 (d'oh!). And this fixes it... though why they released 6.0(.1) I'll never know. – Peter K. Oct 23 '14 at 17:21