SourceKitService high memory usage

Two years ago, I found that ommitting self (for instance variable access, func calls within scope, etc.) would lead to a higher strain on SourceKitService. So, even though not required, I decided to explicitly use self everywhere.


Once Swift 3 and Xcode 8 were available, I started to move my projects to Swift 3. At first, I kept the explict usages of self. At that time, I didn't notice any issues with SourceKitService. Syntax highlighting worked extremely well and memory usage of SourceKitService hovered around 5 GB or less.


This past week, I took a second pass at my projects and removed all usages of self that were not necessary. I believe I'm now seeing slight slowdowns in syntax highlighting. And, about three times now, I've had to quit Xcode to reclaim memory used by SourceKitService. I have 32 GB of RAM and one day that process was using 31 GB (most of physical plus around 9 GB virtual). Other times, it tended to climb up to 15+ GB.


Has anyone else noticed high usage of RAM by SourceKitService and what may cause it? Anyone out there still doing explicit calls to self as I was? I'm trying to find patterns to what is going on. Thank you.


I have a snapshot of my projects with the explicit self, so will switch back to that for a while and monitor memory usage.

Replies

to other c++ developer NEVER EVER start your project with xcode you will thank me later on

Imposible to work now with XCode ... 8.3.1 5 sec. writing code ... then freezing for 2 sec and repeating... it is so frustrating .. no answers nowhere ...

com on apple..👿

com.apple.dt.SourceKitService freezes everything up ...


i'm downgrading ....

I am experiencing the same thing here: https://forums.developer.apple.com/message/222554#222554

in the end it didnt worked out for me 😟

I have updated iPod to 10.3.1 so XCode 8.2.1 does not support it 😟

Tried to force by adding the support files from newer XCode .. it works but began to freeze .. it seems it is in the 10.3.1 somewhere .. or i dont know...


Loosing my mind and time for thease freezes ... and it got worse .... now 5sec some action ... and 3-5sec freeze

Temp Solution


Open Activity Monitor -> Force Close Apple.SourceKit 🙂



I noticed it spike to 800% cpu lol

Hi
Please let me know what is the configuration of your system? because here I am using 8 GB of RAM, Xcode still using more RAM.