Core i7 and still too long compile time

adam_esp
Posts: 37
Joined: Mon Apr 29, 2019 12:09 pm

Core i7 and still too long compile time

Postby adam_esp » Tue Jul 25, 2023 4:07 pm

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 :)

MicroController
Posts: 1736
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Core i7 and still too long compile time

Postby MicroController » Tue Jul 25, 2023 4:26 pm

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.

rico.b
Posts: 3
Joined: Wed Apr 12, 2023 5:11 pm

Re: Core i7 and still too long compile time

Postby rico.b » Tue Jul 25, 2023 4:51 pm

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

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: Core i7 and still too long compile time

Postby ESP_igrr » Tue Jul 25, 2023 7:42 pm

Another thing to check is whether you have ccache enabled. Enabling ccache can significantly speed up subsequent compilations.

Who is online

Users browsing this forum: iParcelBox and 82 guests