ESP32 compiling time is way too long!

bonmotwang
Posts: 42
Joined: Fri Apr 12, 2019 4:25 pm
Location: Canada

Re: ESP32 compiling time is way too long!

Postby bonmotwang » Thu May 16, 2019 2:07 pm

I reinstalled ESP-IDF on a brand new laptop. Core i7 8th Gen, 32G RAM, SSD. Windows 10.
Didn't use Eclipse.
Followed every single step listed on this page:
https://docs.espressif.com/projects/esp ... t-started/
All the way to Step 8.

Excluded the whole C:\msys32 folder in windows defender.

And make -j8. Of course first time it compiled everything and did take a long time.
Then I did make -j8 again several times.
As we expected, it didn't compile anything.
But every time it take about 60 seconds to finish.
Does it take long time to "scan" through the files that have been compiled?

This is the output:

$ make -j8
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
Python requirements from C:/msys32/home/Paul.Wang/esp/esp-idf/requirements.txt are satisfied.

Project is not inside a git repository, will not use 'git describe' to determine PROJECT_VER.
App "hello-world" version: 1
To flash all build output, run 'make flash' or:
python /home/Paul.Wang/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 /home/Paul.Wang/esp/hello_world/build/bootloader/bootloader.bin 0x10000 /home/Paul.Wang/esp/hello_world/build/hello-world.bin 0x8000 /home/Paul.Wang/esp/hello_world/build/partitions_singleapp.bin

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

Re: ESP32 compiling time is way too long!

Postby fly135 » Thu May 16, 2019 4:03 pm

I'm running an old Xeon W3550, 3GHz, 4 core, Win 7. Make -j8 on a fairly sizable project with nothing to recompile takes 3 sec. Rebuilding project with one file recompiled took 12sec.

John A

safetycaptain
Posts: 3
Joined: Wed Mar 13, 2019 6:43 pm

Re: ESP32 compiling time is way too long!

Postby safetycaptain » Thu May 16, 2019 8:34 pm

I use make -j with no number to let make pick how to multitask, builds went from near 2 minutes to 30 - 40 seconds.

It may lock up your computer if it saturates one of your busses, if you have an ssd and enough ram you should be fine.

bonmotwang
Posts: 42
Joined: Fri Apr 12, 2019 4:25 pm
Location: Canada

Re: ESP32 compiling time is way too long!

Postby bonmotwang » Thu May 16, 2019 9:11 pm

Hi John
That's encouraging!
It's very strange on my computer then.

I just installed ESP-IDF follow the CMAKE get started turorial.
idf.py build is so fast!!!
2 seconds if nothing changed.

Are you using CMAKE?

Thanks

Paul

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: ESP32 compiling time is way too long!

Postby ESP_Angus » Fri May 17, 2019 1:47 am

Glad the CMake-based build system is working well for you. This is our long term plan for a better Windows user experience.

For the slow builds, if you (temporarily) go into Windows Defender and disable Real Time Scanning, does the build finish any quicker?

bonmotwang
Posts: 42
Joined: Fri Apr 12, 2019 4:25 pm
Location: Canada

Re: ESP32 compiling time is way too long!

Postby bonmotwang » Fri May 17, 2019 3:03 pm

ESP_Angus wrote:
Fri May 17, 2019 1:47 am
Glad the CMake-based build system is working well for you. This is our long term plan for a better Windows user experience.

For the slow builds, if you (temporarily) go into Windows Defender and disable Real Time Scanning, does the build finish any quicker?
Hi Angus
It didn't help.
I tried everything I could find online and from this forum.
- using -jx or not, didn't change too much.
- disable defender, didn't change too much.
- disable antivirus (Norton), didn't change too much.
Tried on Windows 7 and Windows 10.
both machine takes around 1 min to compile a compiled project.

Glad it is a long term plan. But what is the risk of using CMAKE package for production?

And I don't see a reason why I cannot use Eclipse with CMAKE working, can I?

Thanks

Paul

username
Posts: 539
Joined: Thu May 03, 2018 1:18 pm

Re: ESP32 compiling time is way too long!

Postby username » Fri May 17, 2019 3:44 pm

- using -jx or not, didn't change too much.
Strange, -jx should make a great improvement. Just to be clear your not actually typing "make -jx" right ?
your instead doing something like "make -j8" or "make -j16".

You should open task manger when you start the make, and ensure all your cores are being used.


Annotation 2019-05-17 103944.jpg
Annotation 2019-05-17 103944.jpg (123.77 KiB) Viewed 13828 times

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

Re: ESP32 compiling time is way too long!

Postby fly135 » Fri May 17, 2019 3:45 pm

bonmotwang wrote:
Thu May 16, 2019 9:11 pm
Hi John
That's encouraging!
It's very strange on my computer then.

I just installed ESP-IDF follow the CMAKE get started turorial.
idf.py build is so fast!!!
2 seconds if nothing changed.

Are you using CMAKE?

Thanks

Paul
I'm using IDF v3.1.3 and the make system under MSYS32.

John A

safetycaptain
Posts: 3
Joined: Wed Mar 13, 2019 6:43 pm

Re: ESP32 compiling time is way too long!

Postby safetycaptain » Fri May 17, 2019 4:48 pm

In Cygwin I've experienced just opening python can take in the order of 10 seconds, I've found it quicker to just run a small Linux VM with a shared folder, or switch to Linux completely.

bonmotwang
Posts: 42
Joined: Fri Apr 12, 2019 4:25 pm
Location: Canada

Re: ESP32 compiling time is way too long!

Postby bonmotwang » Sat May 18, 2019 4:19 am

The IDF is V4 now. Not sure if it is new problem intruduced in V4.
Anyway. I am using CMAKE on both workstation now.
It is so fast, just cannot go back anymore.

Cannot wait to set up the environment properly and start the development.

Thanks

Paul

Who is online

Users browsing this forum: No registered users and 87 guests