Earlier quoted context omitted.
Another thing you can do: profile the process to find out what exactly it’s spending all that CPU time on. There are a few different ways to do this on macOS, including the GUI Instruments.app which comes with Xcode, and dtrace. But if you’re the sort who always has a terminal open, the quickest way is to just run sudo spindump Also useful when a process is hung, even if it’s not taking up CPU time. Sometimes the out…
Speaking of the GUI Instruments.app. Is there a way to start a process from there, instead of attaching to an already running process? I used it the other day and could only figure out how to attach to an already running process with it.
Another option is to use `xcrun xctrace` to get a recording from the command line, which can then be opened in Instruments.