The Redmond Issue - Windows' sluggish compilation vs Linux

I don't really know where to put this, so I hope someone will guide me or move it to the appropriate place.

I'm confused not to mention a little bit horrified, re. the speed of write/upload/debug cycle on Windows vs. Linux.

When I go to compile/upload code on Windows the machine seems to languish checking compilations, linking (ya-de-ya) before finally getting to upload the compiled code - even when I've hit upload (after not making any changes) it still goes through a lot of stuff.

Linux on the other hand utterly smokes Windows.

Not only does it compile WAY faster (even on slower hardware!) but it avoid all this re-compilation fiddling around.

It did catch me out with the "Unable to access /ttyUSB0" (permission denied) problem but someone did kindly note there's an easy fix which I'll repeat here in case someone else needs it:

$ sudo chmod a+rw /dev/ttyUSB0

It's not that I prefer Windows, it's more that I'm stuck with it for the moment as my Linux box has issues with its SSD and the bootloader.

This fix above is temporary of course as the device is virtual so if any Linux boffins would care to improve on that I'd be much obliged. Right now I have an electric hen to deal with.

marcdraco:
When I go to compile/upload code on Windows the machine seems to languish checking compilations, linking (ya-de-ya) before finally getting to upload the compiled code

A common cause of slow compilation is your antivirus software doing an on-access scan. The Arduino IDE creates a ton of short processes during the compilation, so if each of these has to wait to be scanned before running, it slows things way down.

Try TEMPORARILY disabling your antivirus for a single compilation to see if you notice that it makes it significantly faster, then turn the antivirus back on. If the compilation is faster with the antivirus off you will need to adjust the settings of your antivirus to whitelist the appropriate file, folder, or process so it doesn't interfere with compilation.

Note that the Arduino IDE does caching during compilation, so subsequent compilations will be faster than the first one. So make sure to not let that throw off your results when you are comparing compilation time.

marcdraco:
even when I've hit upload (after not making any changes) it still goes through a lot of stuff.

As I said above, the Arduino IDE does do caching. However, the sketch is always recompiled. Normally, there has always been a modification to the sketch between each upload (otherwise, what's the point of doing another one?), so it doesn't really make sense to cache the sketch. In the use case where someone is deploying the same sketch to many devices, they are better off using the command line, which does allow you to upload without compiling every time.

marcdraco:
This fix above is temporary of course as the device is virtual so if any Linux boffins would care to improve on that I'd be much obliged.

There are instructions here:
https://www.arduino.cc/en/guide/linux#toc6

Sometimes you will run into some additional issues with permissions on Linux (most often caused by modemmanager). There is a script named "arduino-linux-setup.sh" included with the Arduino IDE installation that provides a "shotgun" approach by doing everything you could possibly need to set things up on a Linux system. If it's more convenient, you can also get it here:
https://raw.githubusercontent.com/arduino/Arduino/master/build/linux/dist/arduino-linux-setup.sh