Well i have had a good search on this subject and read many threads but wondering if I have missed the magic built with respect to speeding up ARDUINO compile times.
system is i5, two ssd one C: Windows 10 and other D: with source code on it.
lots of free RAM.
Test environment is UNO, Nano and BlackPill STM32F411
the test sketches are a single small .ino with only one project being a .ino + .cpp + .h
Typically i have compile time of 20/30 sec or so with the largest STM32 project taking 40 sec or so
I have disable Windows security and got the 40 Sec compile down to about 36 secs or so.
I am using both 1.8.16 and version 2 RC2 IDE's and results are pretty much the same.
By comparison I have a 1000 line VS2019 Windows graphics application that talks (serial) to one of my Arduino apps that compiles in less than two seconds on same system.
So any ideas please why Arduino compile/links times are factor of 10 and more slower than native Win 10 App. What have i missed?
For an experiment load linux. You can load it without modifying your hard drive. Then compile it again and see what is happening. I have seen windows run slower on the same hardware then when it is running linux. I would also take a SWAG and say the STM32 has a lot more overhead in the compiler. then the UNO or Nano.
Many thanks for the linux input but i had already read such links, one even claims to compile on a PI is a few seconds. Which says to me is it really the operating system or how Arduino is implement for an operating system, or is it more to do with the 100 plus variant files that I have installed.
Sorry to nag about this slow build as i think the arduino idea is really great and ver 2 rc2 i a wonderful leap forward. any ideas how to speed up builds most gracefully received imk
I replied to another thread but will repeat the details here because the issue sounds very similar.
I have an Alienware desktop (i7-8700k) that I have both v1.8.19 installed and v2.0.0-rc3 installed. Compile times for a simple program (20 lines, 4 libraries, Nano 33 BLE) after repeating a few times are as follows:
Windows 10 x64 i7, 1.8.19: 1min 8s
Windows 10 x64 i7, 2.0.0 rc3: 52s
antivirus (Norton) exceptions in place, antivirus disabled, ran as admin, all local files on SSD C:, nothing changes the above numbers.
Interestingly I have an old Macbook Air (2015) i5 version. I installed the v2.0.0-rc3 on it to compare and wow what a difference.
Macbook air 2015 with v2.0.0-rc3: 12s!
So this old, slow, surplus Macbook air outperforms my i7 Alienware desktop by a wide margin .....makes no sense. Sure seems to be something with Windows and Arduino that don't get along, but I'm short on answers too.
Some of the reports of slow compilation on Arduino IDE 2.x end up to be actually about the slow throughput on the Output view.
There is a horrible bottleneck somewhere in the system so when you have verbose output enabled in your preferences it slowly prints, which makes it seem like the compilation and uploads are going slowly. In reality, the compilation/upload process is finished long before you finally see the message in the output view that says it is done.
I don't know whether that bug is operating system dependent though. And it does not affect the classic Arduino IDE, only 2.x.
Hello in0
Other have mentioned same, i have however seen leds blink on STMLink programmer as compilation messages finish which kinda indicates compilation just completed. Also i have just up graded to IDE rc3 and after the first compilation following compilations are much quicker.
BTW IDE 2 is great Five Star imk
The core and libraries are cached on the first compilation. So on subsequent compilations only the sketch program itself is recompiled unless you change the board selection or modify the source files that were cached.