Page 1 of 2

Builds are too big and take too long?

Posted: Fri Aug 03, 2018 6:15 pm
by 12pastnoon
Hi all,

I am just starting to get off the ground with ESP32 and ESP-IDF.

Right now, my project doesn't have much in it, just one source file that runs one task. However it seems as though the builds are taking way too long and are building immense amounts of source files from ESP-IDF.

I understand that additional code inevitably needs to become part of the build: such as FreeRTOS, lwIP, and various components.

However it seems like much of the code has little or nothing to do with my project, yet it is being built.

Is it possible to tell the make system not to include unnecessary components? I did not find how to do this with make menuconfig.

Thanks

Re: Builds are too big and take too long?

Posted: Fri Aug 03, 2018 6:20 pm
by kolban
What you should be finding is that after the first build of your project, only things that are changed need to be rebuilt otherwise it is just linkage again. If you run make menuconfig, that forces everything to be rebuilt. You didn't mention what OS you are building on or the nature of your PC. Personally, I find that compiling on Linux is multiple times faster than building on Windows and that compiling with the "-J" make flag (with parameters) enables multi-tasking in the build. A full build from zero for the first time for me takes about 30-60 seconds and after that its virtually instantaneous.

Re: Builds are too big and take too long?

Posted: Sat Aug 04, 2018 9:00 am
by xiaolongba
@kolban
I am also find that compiling on Linux is multiple times faster than building on Windows.But how can i do to improve the speed of compiling on Windows?I test some enviroment,the experimental data is as follows:

1.build the same app project on the same pc
2.it takes 1mins 9seconds on linux os of VirtualBox
3.it takes 3mins 37secons on msys2 of the windows 7 64bit and the same as the Bash on Ubuntu on Windows10 64bit
4.do u have some advices to decrease the building time on windows?

Re: Builds are too big and take too long?

Posted: Sat Aug 04, 2018 10:09 am
by Deouss
Try CMake IDF on Windows)

Re: Builds are too big and take too long?

Posted: Sat Aug 04, 2018 10:58 am
by xiaolongba
Deouss wrote:Try CMake IDF on Windows)
do u have some documents about it? Millions of thanks :D

Re: Builds are too big and take too long?

Posted: Sat Aug 04, 2018 11:19 am
by Deouss

Re: Builds are too big and take too long?

Posted: Sat Aug 04, 2018 3:59 pm
by fly135
xiaolongba wrote:But how can i do to improve the speed of compiling on Windows?
make -j8

Where "8" is the number of concurrent threads. Usually that's 2x the number of cores. i.e. quad core is 8.

Also, disable Windows Defender from scanning your devlopment directories.

https://support.microsoft.com/en-us/hel ... -antivirus

John A

Re: Builds are too big and take too long?

Posted: Sun Aug 05, 2018 5:22 am
by xiaolongba
fly135 wrote:
xiaolongba wrote:But how can i do to improve the speed of compiling on Windows?
make -j8

Where "8" is the number of concurrent threads. Usually that's 2x the number of cores. i.e. quad core is 8.

Also, disable Windows Defender from scanning your devlopment directories.

https://support.microsoft.com/en-us/hel ... -antivirus

John A
thanks for your help.this article i have already read,the method is effective.

Re: Builds are too big and take too long?

Posted: Sun Aug 05, 2018 5:23 am
by xiaolongba
Thank you so much.I will read this tutorial carefully.

Re: Builds are too big and take too long?

Posted: Sun Aug 05, 2018 12:26 pm
by xiaolongba
as do as the tutorial,but Garbled occurred.as shown as below:
WO2R(XLSS4~JBK4@B9U`FVY.png
WO2R(XLSS4~JBK4@B9U`FVY.png (21.6 KiB) Viewed 12262 times