SourceKitService high memory again

Here we go again. Xcode 9 with a single project. Changed one of my APIs, fixed up calling code and then attempted to run unit tests. SourceKitService blew up to 29.65 GB! Mac has 32 GB and is now grinding through virtual memory. Unacceptable Apple! There should be zero reason for SourceKitService to eat up all RAM. This is probably a major memory leak.


new bug filed: rdar://34611679


Original bug filed against Xcode 8.0 betas: 27455405 (a duplicate of 27358273). According to my notes, the bug appeared to have been fixed by Xcode 8.0 beta 4.

Replies

Same experience here. I have to kill SourceKitService every 10 minutes or so to get anything done. It's always pegged at 100% of one CPU core and eventually gets into a state where it blocks Xcode. Killing SourceKitService unblocks Xcode, although a new instance of SourceKitService begins immediately and pegs the core again.

I'm struggling with the same issue: iMac has 32GB RAM and when Xcode is running and occasionally builds project, memory consumption of SourceKitService rockets to 25-30GB so that Xcode becomes unresponsive. I have to force kill xcode and run it again to continue my work.

My personal solution: if possible, stay with 8.3 and wait at least 9.1 for dust to settle !

Identical problem. Easily hits 20+ Gb. I have to work with Activity Monitor open and Force Quit SourceKitService every 10 minutes. If I forget, keyboard and everything locks up. Using Swift, Vision, CoreGraphics. Upgraded this morning to the latest XCode 9.1 beta but problem is even worse.

Same problem here. Didn't have issues with XCode 8.X, but now with XCode 9 I have to force close SourceKitService every couple of hours.

As far as I'm aware, app submission requires at least Xcode 9, so 8.3 is not an option. Unfortunately 😟

Is it sure XCode 9 is required ?

I read in

h ttps://developer.apple.com/app-store/submissions/

that "you can continue to submit apps in Swift 3.2 to the App Store"


Build with Xcode 9 and the latest SDKs.

Xcode 9 includes Swift 4 and the latest SDKs for all Apple platforms. If your app is written in Swift, you can continue to submit apps in Swift 3.2 to the App Store and migrate individual modules to Swift 4 when you're ready.


But, is it 3.2 built with XCode 9 ?

Yes, it is. I'm still developing with Swift 3.2 in Xcode 9 because some of the pods I'm using weren't updated to Swift 4 yet (and this may be a reason to discard them).

Same problem here.

SourceKitService easily rockets up to >25GB in minutes.
Sometimes even Xcode memory usage goes up from 500MB to several GB.


I have to restart Xcode several times a day and have to kill SourceKitService every ~15 min

I have pretty much the same issues as everyone else. There seems to be very major issues with SourceKitService that ruins the whole experience.


For me a quick temporary work-around that fixes most issues (for a while) is to kill ONLY SourceKitService. This can be done using "Activity Monitor" and then navigating to the "Energy" tab. From here you can expand Xcode and see SourceKitService. You can just kill it and it will restart automatically and all of my issues seem to be gone by then, at least for the next 30 mins or so.


I am thinking maybe it's useful to have some dock item to quickly kill SourceKitService.

Same problem here, and this is annoying. Xcode 9 is the buggiest version of all Xcode versions.

I have repeatedly had the same issue. Appears to be if I have a file open with many issues.Have submitted a bug report:rdar://35394749. I have found the best solution is to use Android Studio to develop exclusively for Android instead.