Page 2 of 4

Re: Compile time so slow

Posted: Mon Jan 27, 2020 3:20 pm
by fpiSTM
It seems there is a bug in the Arduino IDE:
https://github.com/arduino-libraries/Ar ... -578033856

Re: Compile time so slow

Posted: Mon Jan 27, 2020 11:11 pm
by fredbox
I saw this come across the RSS feed a short while ago:

We’re excited to announce that Arduino IDE 1.8.11 is here!

In addition to the usual load of bugfixes and small improvements under the hood, the latest version includes:

Improved support for Mac OS X (the app is now notarized and strictly follows the latest OS X recommended security guidelines)
A “send text” command within the serial plotter (so you can interact with the board while plotting data!)
Better sketch build time
Updated AVR core and WiFi firmware

Source: https://blog.arduino.cc/2020/01/27/ardu ... -released/

Re: Compile time so slow

Posted: Tue Mar 03, 2020 1:33 pm
by mrguen
It seems there is mainly a bug in the gcc compiler

https://community.arm.com/developer/too ... to-compile

I am now trying to compile with IDE 1.8.12 and it takes tens of seconds to compile one file. Total time more then 10 minutes... impossible to use at the moment.

Re: Compile time so slow

Posted: Tue Mar 03, 2020 1:48 pm
by fpiSTM
mrguen wrote: Tue Mar 03, 2020 1:33 pm It seems there is mainly a bug in the gcc compiler

https://community.arm.com/developer/too ... to-compile

I am now trying to compile with IDE 1.8.12 and it takes tens of seconds to compile one file. Total time more then 10 minutes... impossible to use at the moment.
Right the 8 version got an issue, I met it even under Linux. This has been solved.
Finally we used the version 9 now...

With version 1.8.12 the compile time is better. If you reach 10 min then open an issue on Arduino side. My guess is you met an issue with your system config and Arduino (Firewall, antivirus,...).


For example, build a blink tooks around 1min30s for the first build, then the next build tooks only 10s thanks the cache even if I change a parameter in the sketch.

Re: Compile time so slow

Posted: Fri Mar 06, 2020 7:17 am
by mrguen
Just tested Blink compilation this morning. It took 2m40s on my Icore 4570 / Windows 10 system. So, yes for a sketch that uses around 30-50% of the resources it takes more than 10 minutes. I really can't see a difference when deacivating AVG antivirus. I really can't go into any details. The architecture of the library seems very complex. But I would really be surprised if that all this compiling all the time was really needed.

Re: Compile time so slow

Posted: Fri Mar 06, 2020 9:01 am
by fpiSTM
Again mrguen, I could not help on this.
you don't want to make the effort to understand but open an issue on Arduino side.

Re: Compile time so slow

Posted: Fri Mar 06, 2020 9:45 am
by ag123
try using an ide e.g. vs-code that has incremental build and that don't use temporary folders. that would take longer for the initial build but subsequent build is incremental and things are normally much faster with incremental build. the build takes a long time in part due to the huge feature set and all the supported mcus bundled with HAL, stm32 libraries, cmsis etc. it needs to evaluate large number of dependencies during the build and is part of the reason.

Re: Compile time so slow

Posted: Fri Mar 06, 2020 3:28 pm
by fredbox
Arduino 1.8.12 on Linux, STM core 1.8.0.
For a small program it takes 22 seconds to compile the first time.
After adding or deleting a line, recompiles take about 3 seconds.

Re: Compile time so slow

Posted: Fri Mar 06, 2020 5:53 pm
by fpiSTM
Right it is at least 10x faster on Linux or MAC.

Re: Compile time so slow

Posted: Wed Mar 11, 2020 12:18 am
by Davor
First compile time for blinky example on my Windows 10: 100sec.

Same thing with these folders added to exclusions from Windows Defender antivirus: 75sec.
C:\Users\USERNAME\AppData\Local\Arduino15\
C:\Program Files (x86)\Arduino\
Windows Defender is still very active in final phase of compiling (up to 80% CPU for the last 30sec).

Same thing on Linux virtual machine in VMware player: 25sec.