Compilation became incredibly slow

Hi all,

I've been using Arduino happily for almost a year, but in the last two days something happened to the IDE: The "Compiling sketch..." phase takes forever, full minutes for the simplest sketch. Verbose output suggests it doesn't get stuck on any particular step - just goes extremely slow overall.

This also happens on the Energia (arduino IDE clone for the TI MSP430 Launchpad), so I guess there are some definitions gone astray in the system, for gcc or whatever both of these use. I've also installed the files for the "Zigduino" and uploaded a program for it before trouble started, but that's on a separate Arduino IDE in a different folder.

I'm using Windows 7, 64-bit. Any suggestions or solutions would be most welcome, except formatting the PC because that's not an option right now...

Thank you very much in advance, Ido

If you have bluetooth: http://arduino.cc/forum/index.php/topic,118440.0.html or disable the bt

Thanks for trying, eried, but the BT in my laptop is disabled by default, and even after I stopped every windows service that looks even remotely related to BT, the compilation delay remains.

I've seen the BT issue is causing delays in uploading and serial communications, but to be clear, this is not the problem I'm experiencing. It's somewhere in the compilation/linking/building process.

Well, I replaced the winavr toolkit so another option is to debug the problem yourself with Process Monitor. Filter arduino related events and check what is the one that takes a lot of time (maybe even the File summary can give you a hint)

Are you running out of hard drive space on the drive where windows is installed or getting short on memory when the IDE is running that causes page swapping to HD?

Problem solved! It was ^%^$#%& ZoneAlarm!

I checked it based on a hunch and indeed, it somehow decided Arduino isn't trustworthy enough and bogged it down behind the curtains. Killing ZoneAlarm, or even setting the Arduino trust level there to the highest manually, brought speed back like magic.

Riva - thank you too, I forgot to mention that the slow compiling did not seem to affect anything else in the system, so it wasn't a resource problem.

Well, 'till the next mystery, folks! Have a great week! :)

I am having the same problem the compilation process became very slow can please help me to fix it?

Me too, high compilation speed with Windows-XP but on my laptop with Windows 7extremely slow speed!!! Installed already latest Java, switched off McAfee etc however no improvements. What is the solution?

pieterpos: Me too, high compilation speed with Windows-XP but on my laptop with Windows 7extremely slow speed!!! Installed already latest Java, switched off McAfee etc however no improvements. What is the solution?

Arduino IDE has Java built in to it's distribution, someone here suggested that if you have Java console installed then that [u]may[/u] be used instead of the internal version. Have you tried un-installing Java, re-booting and then trying to compile a sketch using the IDE?

Same problem.
I set compiling to verbose and see lots of these lines

warning: this is the location of the previous definition

and these kinds

warning: “BIN” redefined
In file included from c:/documents and settings/jacques/my documents/arduino/arduino-1.0.4-windows/arduino-1.0.4/hardware/tools/avr/lib/gcc/…/…/avr/include/avr/iotn45.h:38,

and these kind of things, I guess referring to a problem within libraries etc. that came with Arduino.

C:\Documents and Settings\JACQUES\My Documents\Arduino\arduino-1.0.4-windows\arduino-1.0.4\hardware\tiny\cores\tiny\wiring_pulse.c:53: warning: cast to pointer from integer of different size

And even these kinds

c:/documents and settings/jacques/my documents/arduino/arduino-1.0.4-windows/arduino-1.0.4/hardware/tools/avr/lib/gcc/…/…/avr/include/avr/delay.h:36:2: warning: #warning “This file has been moved to <util/delay.h>.”

Is that what is making my code so slow? I am using stock standard IDE 1.0.4.

Bergie: Same problem. ...

Is that what is making my code so slow? I am using stock standard IDE 1.0.4.

Slow to compile or slow to execute? Is this an installation problem?

Execution is normal. When I click compile, it becomes slow. The same sketch that took a few seconds to compile now take several minutes. I did re-install Jave, unblocked Arduino in my Firewall etc, But since two weeks ago, prior to upgrading from 1.0.1 to 1.0.4 compiling takes much longer than usual. Thank you

What kind of CPU and how much RAM? Can you watch task manager while compiling?

Bergie: I did re-install Jave, unblocked Arduino in my Firewall etc

Have you tried uninstalling Java completely and trying? The Arduino IDE package includes it's own Java runtimes and I wonder if updating the full version of Java some how breaks these.

I have been fighting this for months and finally found MY problem: ESET Smart Security was apparently constantly checking USB ports and the Virtual com port etc.

My solution:

ESET Smart Security - Realtime File system protection - Advanced Setup - Additonal Threatsense Parameters.. [x] Advanced heuristics on executable files from removeable media exceptions

IDE 1.04 and 1.05 BLINK went from 2 minutes to 15 seconds to Verify! (FIRST Verify can take a long time.. 60 seconds or so...)

*** UPDATE: Still having slowness problems; see following post..

Hi Everyone,

I really need to track this to the root cause.

I have 3 machines I often use:

  1. Win7 64 bit Athlon 4 cores 12GB... BLINK takes 90 to 100 seconds to verify (after first verify which is longer)
  2. Win7 64 bit AMD sempron 2GB Blink verifies in 2 SECONDS OR LESS!!!
  3. WinXP 32 bit INTEL Quad core 2 GB BLINK takes 70 to 90 seconds to verify

On machine 2, more complex examples take less than 3 SECONDS!

Versions 0023, 1.02 1.05 behave the same....

So. WTF?? Really!

This is a really serious problem. If I encounter this in workshops with students this may be a killer to the whole Arduino thing.

Has anyone heard anything recent about this?? I really have to dig into this. it is intolerable.

I just tested verify on blink with my Core 2 Duo E6700. ~3 GB RAM

I took 15 seconds the first verify and 3 seconds on the next one. Alittle slow but not super bad.

terryking228: 1. Win7 64 bit Athlon 4 cores 12GB... BLINK takes 90 to 100 seconds to verify (after first verify which is longer) 2. Win7 64 bit AMD sempron 2GB Blink verifies in 2 SECONDS OR LESS!!! 3. WinXP 32 bit INTEL Quad core 2 GB BLINK takes 70 to 90 seconds to verify

On machine 2, more complex examples take less than 3 SECONDS!

The general consensus normally points to anti-virus software being the culprit. What's different about the Sempron machine compared to the other 2. Do the machines have Java Console installed? From other peoples descriptions I wondered if the IDE's "built-in" Java does not get used if the full Java console is available and changes in the full console is slowing the game down.

Hi and thanks for the responses.

The main difference on the Fast machine is I have NOT responded to the invitation to update JAVA.

I have removed Java (using Add-Remove programs) on the other machines with no effect.

IsThere another way to remove "Java Console" etc??

I have disabled ESET AntiVirus and realtime file protection with no effect (but configuring ESET to not check USB did help a little).

Any pointers greatly appreciated! I am doing lots of examples for http://ArduinoInfo.Info and this is really Slooowwiing me down.

terryking228:
The main difference on the Fast machine is I have NOT responded to the invitation to update JAVA.

I have removed Java (using Add-Remove programs) on the other machines with no effect.

IsThere another way to remove “Java Console” etc??

There is a java removal tool that looks like it deletes older versions of Java but not the current one. Maybe running that will clean up any files left by old versions of java and the uninstall tool would remove the latest.
I wonder if java updates scan the PC looking for old libraries etc and updates them. Maybe worth trying the java uninstaller and then removing/ re-downloading arduino IDE in case it’s internal java files have been somehow updated.