Dead Slow IDE on Mac

I did some searching and I see that a slow IDE seems to be a problem people have been experiencing, but I only see discussions of windows systems. I attempted to compile Marlin firmware on my Mac running Arduino 1.8.12 on OS 10.12.6. After 4 hours, I gave up and killed the process. The Marlin web page said it should take up to 2 minute to compile, so something is very wrong.

During the compile process, Activity Monitor reported that Arduino's CPU utilization oscillated between a low value, something like 20%, and a high value, something like 600%. The oscillations happened every 45 seconds or so.

Does anybody have any advice? I also tried 1.9.0, and the result was the same.