When com.apple.dt.SKAgent is hungry on your CPU

Mykola Bilovus
Dec 17, 2020

So, you do a macOS development. And of course, you use the Xcode for your programming tasks.
Xcode often times starts indexing source files and run the com.apple.dt.SKAgent process in the background.
This process can be very hungry on your CPU, overtaking all the processing power from other applications. You experience the whole system slowdown and unresponsiveness, and annoyance might hit your productivity ;)
Since you need syntax hints while programming, simply killing the indexing process is not what you want.
Your silver bullet is to lower indexing process’s priority, thus allowing the system to serve processing power to your other lovely macOS apps.

Here is a single command to run in the terminal:

$ sudo renice 20 `pgrep com.apple.dt.SKAgent`

This will set com.apple.dt.SKAgent process’s priority to the lowest value.

That’s it.
Enjoy your coding!)

--

--