If this happens for each library recursively then that might explain the 5 min compile time. I believe the compiler is pulling each dependant file separately from an external sources which then kicks off the virus checker on each occasion. I did a test in this thread, and Linux was 2-3 times faster than Windows (I couldn't find an explanation, so if anyone has an idea?): If you have an old machine even the better.Ĭompilation of large libraries (especially ESP8266/ESP32 because of the large core libraries) seems to be significantly faster on Linux (at least it was a couple of years ago when I still used Windows from time to time).
Just for Grins, try Linux Mint 20 and see if it works better. Subsequent builds are much faster, because the core libraries will be cached, so only your sketch has to be rebuilt (this cannot be parallelized). I just tried compiling an ESP32 example using Arduino IDE 1.8.9 on Ubuntu 20.04, and it used 100% on all 8 threads while compiling for the first time.
The largest code I ever created and compiled was 26k final size. Arduino IDE only uses one core, it was never coded to support multiple cores and there's little reason, the majority of codes are small the compiler usually completes in some seconds.