I compile project for Watchy, it is ESP32S3
I switched on verbose output during compile
So I see that about half of time spent on resolving libraries
As I do not change libraries then is it possible to avoid resolving and use the resolving data from previous compilation ?
If you compile a file for the first time. Everything is re-compiled.
This happends too if you save a *.ino-file as "save to ..." with a new filename.
If you only modify the code but keep the filename then precompiled files are used.
All ESP32's use FreeRTOS as the framework, which is a lot of code. This is the reason
why it takes longer for a ESP32-project to compile than a Arduino-Uno-project.
In the compiling-process there are millions of steps to do. And as there are so many steps and so many lines of code calculation-speed of your computer has a significant effect.
I compiled a ESP32-project on an old Terra mini-PC. This computer is optimised for low-power-consumption. First compile took 12 minutes. second compile 5 minutes.
If I compile the exact same code on a
Lenovo Thinkpad T480 first compile 4 minutes, second compile 1 minute
I did this with Arduino-IDE Version 1.8.19.
The Arduino-IDE Version 2.X had a lot of performance-problems at the beginning.
And there is still one thing that keeps me away from using Version 2.X.
The new IDE Version 2.X.Y has a fundamental problem with the serial monitor
In Arduino-IDE-Version 2.X.Y the serial monitor is crippled.
You can't make effective use of it.
This is a problem that has been discussed for more than a half year now, but the Arduino-IDE-development-team refuses to work on a solution.
This means your solution is to work with Arduino-IDE 1.8.19. There is a possability to have Arduino-IDE 1.8.19 on the same computer without interfering with IDE 2.X.Y.
This is done through making the Arduino-IDE Version 1.8.19 as a portable version. The portable version 1.8.19 does not interfere with a Arduino-IDE 2.X.Y-Installation.
Arduino-IDE Version 1.8.19 does have less bells and whistles than IDE 2.X.Y but compiles and uploads just the same. And serial printing works like a charm.
The developers have done some work on at least optimizing the process.
I wrote a summary of the work this summer. The part about requesting beta testers is outdated because the GitHub feature that is used to provide downloads of beta tester builds only makes them available for 90 days, which has already passed. But the rest of the information is still useful to someone interested in learning about that development:
There is one if you are compiling your sketch using Arduino CLI directly:
There is an interesting discussion about improving the efficiency of the library discovery process here:
Please only comment on the GitHub issue thread if you have new technical information that will assist with the resolution. General discussion and support requests are always welcome here on the Arduino Forum.
There could be, but one won't be added because there isn't significant need for such a thing in the user base. So if you want this then you should either use Arduino CLI or else make a fork of Arduino IDE and add it to the code yourself.