I am having a lot of trouble with stupid SourceKitService. It is taking up like 20GB of memory sometimes and just means my lapTop is pretty much useless it is so slow. I am using xCode 6.4 and working in Swift. I am working on a large project so I am sure that contributes to the problem.
But I was just wondering if anyone has found away to tame the SourceKit beast and stop it from going out of control and taking all my memory?
I encountered this issue in XCode 7 and it was still present after upgrading to XCode 8. In my case I narrowed it down to a bit of code that calls a database wrapper (GRDB) like so:
db.execute(sqlStatement,arguments:["ParamNameA":someValueA,"ParamNameB":someValueB]);
If the number of elements in the arguments dictionary is more than 20, SourceKitService memory usage goes nuts (15 GB or more) and the compile times are over 10 minutes. If the number of elements is less than or equal to 20, memory usage of SourceKitService is under 200 MB and compile time is a couple of seconds.
I would suggest looking for bits of code that have a dictionary of more than 20 elements and commenting them out to see if the problem goes away.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With