Page 1 of 1

Core i7 and still too long compile time

Posted: Tue Jul 25, 2023 4:07 pm
by adam_esp
Hello,

I have a powerful core i7 computer and yet the compilation of the ESP32 project takes a few minutes. How can I enable compilation for all cores of the computer?
In other environments (e.g. for STM) the compilation of similar software on eight cores takes a few seconds.
I will be grateful for answers :)

Re: Core i7 and still too long compile time

Posted: Tue Jul 25, 2023 4:26 pm
by MicroController
How can I enable compilation for all cores of the computer?
Shouldn't be an issue (see https://github.com/espressif/esp-idf/issues/6714).
What's your CPU load while building? All cores busy?

But yes, (re-)compiling the 800-1200 source files of an average IDF project, even on all cores, does take quite a while for me too. Fortunately, once that's done, successive compilations are much faster - unless and until the build system deems a full rebuild necessary, specifically after any change to CMakeList.txt or sdkconfig (via menuconfig).

Apparently, some antiviruses also slow stuff down significantly, so you may want to try and temporarily disable yours for a full build.

Re: Core i7 and still too long compile time

Posted: Tue Jul 25, 2023 4:51 pm
by rico.b
Are you running under windows?

I had to disable the realtime antimaleware service from windows while building. ( It seams that the exceptions added by the install or export script, do not work on build :ugeek: )

The build took only one fifth as long after that.

Cheers

Re: Core i7 and still too long compile time

Posted: Tue Jul 25, 2023 7:42 pm
by ESP_igrr
Another thing to check is whether you have ccache enabled. Enabling ccache can significantly speed up subsequent compilations.