Builds are too big and take too long?

12pastnoon
Posts: 8
Joined: Sun Jul 29, 2018 6:45 pm

Builds are too big and take too long?

Postby 12pastnoon » Fri Aug 03, 2018 6:15 pm

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

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Builds are too big and take too long?

Postby kolban » Fri Aug 03, 2018 6:20 pm

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.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

xiaolongba
Posts: 12
Joined: Sat Dec 03, 2016 11:35 am

Re: Builds are too big and take too long?

Postby xiaolongba » Sat Aug 04, 2018 9:00 am

@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?

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Re: Builds are too big and take too long?

Postby Deouss » Sat Aug 04, 2018 10:09 am

Try CMake IDF on Windows)

xiaolongba
Posts: 12
Joined: Sat Dec 03, 2016 11:35 am

Re: Builds are too big and take too long?

Postby xiaolongba » Sat Aug 04, 2018 10:58 am

Deouss wrote:Try CMake IDF on Windows)
do u have some documents about it? Millions of thanks :D

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Re: Builds are too big and take too long?

Postby Deouss » Sat Aug 04, 2018 11:19 am


User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: Builds are too big and take too long?

Postby fly135 » Sat Aug 04, 2018 3:59 pm

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

xiaolongba
Posts: 12
Joined: Sat Dec 03, 2016 11:35 am

Re: Builds are too big and take too long?

Postby xiaolongba » Sun Aug 05, 2018 5:22 am

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.

xiaolongba
Posts: 12
Joined: Sat Dec 03, 2016 11:35 am

Re: Builds are too big and take too long?

Postby xiaolongba » Sun Aug 05, 2018 5:23 am

Thank you so much.I will read this tutorial carefully.

xiaolongba
Posts: 12
Joined: Sat Dec 03, 2016 11:35 am

Re: Builds are too big and take too long?

Postby xiaolongba » Sun Aug 05, 2018 12:26 pm

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 11113 times

Who is online

Users browsing this forum: bushpulbek, ESP_Roland and 152 guests