Page 2 of 2

Re: ESP32 compiling time is way too long!

Posted: Thu May 16, 2019 2:07 pm
by bonmotwang
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

Re: ESP32 compiling time is way too long!

Posted: Thu May 16, 2019 4:03 pm
by fly135
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

Re: ESP32 compiling time is way too long!

Posted: Thu May 16, 2019 8:34 pm
by safetycaptain
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.

Re: ESP32 compiling time is way too long!

Posted: Thu May 16, 2019 9:11 pm
by bonmotwang
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

Re: ESP32 compiling time is way too long!

Posted: Fri May 17, 2019 1:47 am
by ESP_Angus
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?

Re: ESP32 compiling time is way too long!

Posted: Fri May 17, 2019 3:03 pm
by bonmotwang
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

Re: ESP32 compiling time is way too long!

Posted: Fri May 17, 2019 3:44 pm
by username
- 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 1024 times

Re: ESP32 compiling time is way too long!

Posted: Fri May 17, 2019 3:45 pm
by fly135
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

Re: ESP32 compiling time is way too long!

Posted: Fri May 17, 2019 4:48 pm
by safetycaptain
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.

Re: ESP32 compiling time is way too long!

Posted: Sat May 18, 2019 4:19 am
by bonmotwang
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