Windows vs Linux compiler performance #2228
-
Noticed that the Earle Philhower Arduino core for RP2040 compiles "much" faster on Linux machines than on Windows (2x - 3x faster). We have a number of older PC's in a classroom setting running Win 10 and the compilation process terribly slow. I can run twice as fast on an 8Gb Raspberry Pi 5 than an older Intel I5 (the classroom pc). I also tested this out on an I9 laptop with 64Gb running Win 11 and running WSL with Arduino installed on Linux running side by side with arduino installed with Windows. Compilation time under Ubuntu under WSL is significantly faster for rp2040 as well. (note: this is just compile times... not uploading) So my question is... is there a way to make the Windows compilation time run faster? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Could it be antivirus related? GCC will touch 100s of files per compilation and if MS Defender/Avast/etc. is scanning through them it will burn CPU like mad. Is there a way to disable antivirus (just for testing!) and compare times? If that gives back a good chunk, then maybe there are special directory or file type exclusions you can set? It could just be a function of the MinGW runtime, which is used to allow GCC to be built as a native app. In that case, I think you're kind of out of luck. Really bodge-tastic, but it is also possible to run VNC server under WSL and start up the Linux Arduino. Use VNCViewer to actually display and interact with it. I believe the whole NTFS filesystem is available so you can still access files normally. |
Beta Was this translation helpful? Give feedback.
Could it be antivirus related? GCC will touch 100s of files per compilation and if MS Defender/Avast/etc. is scanning through them it will burn CPU like mad. Is there a way to disable antivirus (just for testing!) and compare times? If that gives back a good chunk, then maybe there are special directory or file type exclusions you can set?
It could just be a function of the MinGW runtime, which is used to allow GCC to be built as a native app. In that case, I think you're kind of out of luck.
Really bodge-tastic, but it is also possible to run VNC server under WSL and start up the Linux Arduino. Use VNCViewer to actually display and interact with it. I believe the whole NTFS filesystem is…