Slow compilation in Windows

Hi,

I've recently dual booted Linux Mint 17.3 with Windows 10 and the first thing I noticed while using the Arduino IDE was that compilation is magnitudes faster in Linux compared to Windows. For instance a sketch with a binary size of 2248 bytes compiles nearly instantaneously on Linux while it takes 5.5 seconds on Windows. It may not sound too long but it quickly gets annoying and becomes problematic when compiling bigger sketches.

Does anyone have an idea about the reason of this? I highly doubt that it's caused by my system specs(as it runs just fine on linux)but I'll attach my specs anyway.

Thanks in advance

I've seen reports of slow compilation that was caused by the antivirus program. You could test if this is the cause by temporarily disabling your windows antivirus software and see if that has an effect on the speed. Note that compiling is faster when you are rebuilding a sketch rather than the initial build so be careful that doesn't skew your results.

Thanks for the reply, I've tried compiling with the antivirus software turned off but the results were still the same. Also, I forgot to add that initial builds and rebuilds are both slow on Windows while initial builds take approximately a split second and rebuilds complete nearly instantaneously Linux.

EDIT: updating the IDE didn't help either.

Thanks in advance

have you been able to fix this?
I have the same problem with Windows 7 and arduino 1.6.7
It looks like the previous build results are not reused at all

Then there is software that's conflicting with the IDE. It could be your Java software. I have also heard of conflicts with built in bluetooth.

thanks, i will try on few different workstations to see if there will be some success somewhere

Check out the post from 'Toshibass' near the end of

http://forum.arduino.cc/index.php?topic=82527.15

Worked for me after hours of messing around.

Thanks, i will have a look. Eventually i found out that the Antivirus Software greatly decreases compilation speed. But in addition i moved to PlatformIO and use the Arduino IDE only for quickly compiling some examples :slight_smile:

Add the Arduino directories to your antivirus exclusions.

So that would be at least two of the following.

C:\Program Files (x86)\Arduino
C:\Users\yourname\AppData\Local\Arduino15 depends on IDE
C:\Users\yourname\AppData\Roaming\Arduino15 depends on ide

If you have your sketches set up in a different location its also worth adding that directory to the exclusions also.

Additionally if you also use the online IDE the following directories.

C:\Users\yourname\AppData\Roaming\ArduinoCreateAgent
C:\Users\yourname\AppData.arduino-create

If you have installed to a different drive swap the drive letter as needed.
If you also have an unzipped IDE installed that path should also be added to exclusions

AAHHH Thanks! I will do it
I do not know how i did not came to this :frowning:
I've been disabling my AV after each restart ever since i discovered this :))) (March this year :)) )
luckiely nobody took my stuff for ransom