Arduino IDE - slow to compile

The Arduino IDE is much too slow to compile, even compiling the simplest codes such as Blink, the code takes more than 5 minutes to be compiled

Any suggested solution?

There was another thread on this in this section. I don't know if they ever found a resolution though - for me, compiling is slow - like 30-60 seconds - but not 5 minutes slow.

It was suggested that the problem might be antivirus software trying to check every intermediate file, but the previous poster denied using antivirus software.

That was here, most recently: http://forum.arduino.cc/index.php?topic=333470.msg2416099#msg2416099
The last message was mine, which said, and I'll repeat (maybe someone will follow-up this time):

Can you be more specific? WHICH code takes longer? How much longer? Using what version of the Arduino IDE? Is this the first or subsequent compile of the code? Using what operating system or what sort of hardware?

As people have mentioned, Arduino does not use "make", so it tends to compile a bunch of libraries whether or not they are needed. But in spite of that, your "much longer" description does not match my actual experience. I just fired up my windows Virtual box (XP, 2G Ram, one 2.8GHz cpu), and it takes Arduino (1.6.5) about 9s to compile "Blink", while it takes Atmel Studio (6.2.1502) about 7s to compile the "MEGA LED Example for Xplained Mini 328p" (both "initial" compiles. Subsequent compiles are about 3s for both of them.)

Every once in a while, someone complains that "Arduino compiles really slowly", by which they seem to mean "minutes for a small example", but I don't think any of those people have stuck around long enough for us to get to the bottom of their problems. "MUCH slower" (say, 5x longer for a significant sketch, or 30s longer for a trivial sketch) does not appear to be something that arduino can excuse under "well, we do things a bit differently and sometimes its a bit slower", but rather "something is seriously broken with respect to this particular example, and we should figure out what!" (but WE NEED DETAILS!) (5 to 10s longer in a 30s compile is not "much longer", IMO. Although perhaps that time waiting literal minutes for "page down" to happen on the mainframe terminal has skewed my perspective...)

Hello friend,

I used the example of "Blink" in a machine with windows 7, 4gb ram, 2.69 Ghz Pentium cpu, Arduino IDE 1.6.5, without any included library (only open the example "Blink" of the Arduino IDE), time to compiling the first time was about 30 seconds in subsequent compilation time was less than 10 seconds. This time is great.

Now on a machine with Windows 10, 8gb ram, 2.4 Ghz i7 cpu, Arduino IDE 1.6.5 the same example took more than five minutes to compile the first time, subsequent builds (even if nothing is changed in the code) lasted the same time , sometimes they come to take 10 minutes to compile the same code (without being exaggerated, literally 10 minutes) ... during a project where I need to change only some values ​​have to wait 10 minutes to test the code is totally painful.

I've tried reinstalling Java, the Java update, disable antivirus, disable the firewall, install earlier versions of the Arduino IDE (including replacing the file rxtxSerial.dll in previous versions), run the IDE in compatibility mode, disable all Bluetooth devices. .. but no solution, always the same problem

:frowning:

for the record, my windows-10 VM, with 2x cores and 2G Ram, compiles blink in about 40s. That's significantly slower than WXP VMs, but no where near the sorts of times you are seeing (on what should be a much faster machine.)
Let me see if I can put together a modification that will get more useful data out of the log file.
(A first step is to turn on the "verbose" options in the preferences dialog, and look for something suspicious. What I'm going to be doing is trying to add a timestamp to each step, so as to get nice concrete data.)

Here are the data displayed during program compilation (Windows 10 and Windows 7), the curious thing is that the data compiled program windows 10 is no different from compiled on windows 7, what I realized was just that every file created in win10 took a much longer time to be created than in win7.

Verify win 7:

Verify win 10:
https://www.dropbox.com/s/9wnff8jm9v3nk6f/verify%20win%2010.txt?dl=0

In Windows 7 the creation of each file happens so it is not possible to read the filename, while in the win10 file creation processor starts, and it takes several seconds before moving to the next file

I really do not understand what is going on, the antivirus is completely disabled, and the Arduino is allowed on the firewall ... nothing prevents creation of files

every file created in win10 took a much longer time to be created

So the "pace" seemed steady? No particular command that took much longer than others? Hmm.

Can you do a directory listing of the build directory after a compile? That should show the file creation times; almost as good as a timestamp. (I'm having trouble adding timestamping to the build itself :frowning: )

Are you using a "local" or "microsoft" login? Regular user or Administrator? Is anything set up to use "oneDrive"?
Does a compile still work if you completely disconnect your computer from the internet?

On an actual win 10 machine I have 16 seconds first compile and 8 seconds subsequent compile:

win 10 64-bit home fresh install
Core i5 4200U 8GB ram Samsung 850 EVO SSD

I am about to give up using the Arduino IDE on that machine, I'm pretty sure that the antivirus somehow (even completely disabled) is delaying the creation of the build files ...

(Note: I'm using McAfee, which incidentally only has given me problems hahahah)

Maybe I uninstall the antivirus in a future very soon, and try again