Since macOS Sierra or High Sierra, macOS has become really, really slow.
Reinstalling El Capitan (even today) solves the issue.
GNU/Linux and Windows are also much faster, more like El Capitan was.
By slower, I mean twice (or more) the time to build a simple C project (from 5-6 seconds to 15 seconds), the whole system is really sluggish, I really think that it is a macOS issue.
For information, I tested mainly with gcc-9 and clang-10 with my school projects.
I also used tcc 0.9.27, built from source, with a dummy make+C project, see below.
I have already tried to reinstall macOS.
I am not sure about what to do, have anybody ecountered this ?
I need macOS for the iOS/tvOS toolchain, therefore I cannot switch.
Switching to a GNU/Linux distro would be nice if I could.
If anybody needs more specific data, do not hesitate.
Many thanks for your help !
Edit: I tried to replace a kext and got significant improvements, see below.
Things I tested always on the same computer with this dummy repo edrflt/build_speed :
tcc 0.9.27, built from source
Ubuntu 20.04 (fast) 0,94s user 0,53s system 342% cpu 0,428 total Mac OS X Yosemite 10.10 (fast) 1,84s user 1,05s system 284% cpu 1,016 total Mac OS X El Capitan 10.11 (fast) 3,04s user 1,18s system 316% cpu 1,332 total macOS Sierra 10.12 4,70s user 2,64s system 265% cpu 2,769 total macOS High Sierra 10.13 6,03s user 2,79s system 257% cpu 3,428 total macOS Mojave 10.14 (slow) 8,30s user 3,09s system 231% cpu 4,912 total macOS Catalina 10.15 (slow) 6,01s user 3,35s system 193% cpu 4,827 total
Build time is multiplied by almost 5 vs Ubuntu 20.04 which takes less than one second.
Ubuntu 20.04 - gcc 9.3.0 from apt
make -j5 10,15s user 4,69s system 361% cpu 4,111 total make -j5 10,13s user 4,74s system 357% cpu 4,162 total make -j5 10,27s user 4,54s system 359% cpu 4,119 total
macOS Catalina 10.15 - gcc 9.3.0 from brew
make -j5 13,95s user 10,55s system 298% cpu 8,204 total make -j5 16,91s user 12,81s system 252% cpu 11,752 total make -j5 14,05s user 10,81s system 295% cpu 8,412 total
Kext replacement - significant improvements
After some investigations, I found that
IOPlatformPluginFamily.kext could be the culprit (or one of them).
I replaced the kext in my setup of Catalina with the one from El Capitan, ran the same tests, got these results (with tcc) :
make -j5 5.75s user 2.21s system 278% cpu 2.862 total make -j5 5.78s user 2.13s system 278% cpu 2.837 total make -j5 5.74s user 2.13s system 277% cpu 2.836 total make -j5 5.74s user 2.14s system 288% cpu 2.736 total
What I understand here is that I got performances around the one I could get with Sierra. I am not really sure about the reasons.
I could see that
IOPlatformPluginFamily.kext changed (this file is related to my Mac model) but I'm unsure about this one.
I also saw that the binary X86PlatformPlugin changed but I did not any further investigation on it.
I will share any additional data I can find.
My MacBook Pro is this one :
MacBook Pro (Retina 13, early 2015) - MacBookPro12,1
i5 5257U - 8GB
I am totally open to any tests, any suggestion.
I know I don't know enough about low level OS components and compilers, therefore if you have the time, explain me like I'm five.
I will take any time that would be needed.
This is not at all about macOS is better, GNU/Linux is better ... no no, this is about "I want my computer to get his speed back".