Hi,
I've been struggeling a bit to get a smooth developer experience with the ESP-IDF setup:
1. Building on windows is super slow. It takes about 1 minute to compile hello world in the fastest scenario. Is there a way to speed things up???
2. Everytime I build make project, every single component of the ESP-IDF lib is being built (including IPv6, libsodium) and a lot of other stuff. How can I prevent the compiler from compiling all these things I don't need?
Thanks!
Tom
Slow Windows builds
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: Compile issue
Building on Windows unfortunately is slower than under other OSses (Mac/Linux). This mostly is because the build system does a fair amount of fork()ing, which is slow under Windows. Normally, this is less of an issue, because after you edit a file and re-run 'make', only the components that are changed get re-built. Can I ask how specifically you re-build your project?
Re: Compile issue
Thi Antivirus Software will check if all in compiling time generated file are safe. Which I believe will pull the whole process even slowser!
So I changed to use ESP-IDF in Virtualbox. I am not fan for Virtualization,but it speed up everything.
cheers
Gfast2
So I changed to use ESP-IDF in Virtualbox. I am not fan for Virtualization,but it speed up everything.
cheers
Gfast2
-
- Posts: 3
- Joined: Tue Mar 19, 2019 11:21 pm
Re: Compile issue
Has anyone really got to the bottom of this Windows 10 extremely slow build issue yet?
When I build hello world, it roughly builds at a rate of 1 file every 3s. I would show video, but it's so boring!
Anyway, checking the Task manager shows 0% task usage for the Bash shell, which means it would probably build a lot faster on an ESP32 device, let alone a 3.5GHz Quad Core.
I checked memory usage at 3MB one of the smallest I have seen and no network traffic. So somehow it's mostly asleep!
make -j4 menuconfig
Takes roughly 30 seconds without building any files (as far as I can see) and with 0% CPU usage.
Any idea what's going on?
When I build hello world, it roughly builds at a rate of 1 file every 3s. I would show video, but it's so boring!
Anyway, checking the Task manager shows 0% task usage for the Bash shell, which means it would probably build a lot faster on an ESP32 device, let alone a 3.5GHz Quad Core.
I checked memory usage at 3MB one of the smallest I have seen and no network traffic. So somehow it's mostly asleep!
make -j4 menuconfig
Takes roughly 30 seconds without building any files (as far as I can see) and with 0% CPU usage.
Any idea what's going on?
Re: Compile issue
- Windows Defender real-time scanning can use a lot of CPU checking file accesses during builds. If you look in Windows Task Manager then you may see at least one Service Host process using a lot of CPU. This problem is not unique to IDF, unfortunately. You can add exceptions for ESP-IDF and MSYS2 files/directories and process names in Defender, and this can help a lot. We are working on an automated fix for this, but it's relatively complex and there are obviously risks involved in bypassing Defender checks. (The Microsoft WSL GitHub issue linked above has some more details about the overall issue.)
- The new CMake-based build system with Ninja build tool is quite a bit faster under Windows, as it doesn't require the MSYS2 "unix" layer. It's still subject to Windows Defender scanning, though.
- If it's not these things then I'm not sure what it is: maybe a different anti-virus, or maybe something else?
- The new CMake-based build system with Ninja build tool is quite a bit faster under Windows, as it doesn't require the MSYS2 "unix" layer. It's still subject to Windows Defender scanning, though.
- If it's not these things then I'm not sure what it is: maybe a different anti-virus, or maybe something else?
Who is online
Users browsing this forum: Baidu [Spider] and 130 guests