The compilation is very slowly
-
- Posts: 7
- Joined: Mon Jul 16, 2018 6:04 am
The compilation is very slowly
Hello,
I would like to improve the time of the compilation.
It is very slowly and it makes imposible to work with ESP32.
I am reading some threads about it and I think that it could be very good issue:
Run the build with "make -jN" where N is a large-ish number (try double the number of CPUs in your system).
but where I must to put this line?
I would like to improve the time of the compilation.
It is very slowly and it makes imposible to work with ESP32.
I am reading some threads about it and I think that it could be very good issue:
Run the build with "make -jN" where N is a large-ish number (try double the number of CPUs in your system).
but where I must to put this line?
Re: The compilation is very slowly
How are you building ESP-IDF now? By running "make", or by using Eclipse or some other program?
Re: The compilation is very slowly
Has anyone done a performance test of a build on Linux compared to a build on Windows 10 for the same application/project? If not, I'll be happy to run Windows 10 and Linux in two Virtual Box environments on Windows 10 with both configured to the same RAM and same processor count. Everything I have seen so far leads me to a "visual feel" that Linux is dramatically faster but I haven't quantified that yet. I'm posting here in case someone has some existing metrics or may have done the experiment themselves.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
-
- Posts: 7
- Joined: Mon Jul 16, 2018 6:04 am
Re: The compilation is very slowly
Hello,
I am using eclipse framework.
Best regards,
Juan
I am using eclipse framework.
Best regards,
Juan
-
- Posts: 10
- Joined: Wed Sep 05, 2018 8:02 am
Re: The compilation is very slowly
I also had the same problem, I solved in part this way:
1. Regedit
2. Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
3. create key DisableAntiSpyware -> value 1
1. Regedit
2. Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
3. create key DisableAntiSpyware -> value 1
Re: The compilation is very slowly
You can enable parallel builds (equivalent of -j option) in the Project Properties under C/C++ Build -> Behavior:
You may find you get even better performance on Windows by choosing more than the "Optimal" number of jobs.
Running parallel builds helps in Windows. However the slowness of Windows builds was a major reason for supporting CMake in IDF V3.2 (and migrating to CMake by default in IDF v4.0.) Building under CMake is still faster in Linux, but the difference is significantly less...
(When we were first previewing CMake, a full CMake+ninja build under Windows was approximately as fast as a GNU Make build under Linux, but a full CMake+ninja build under Linux was faster than a GNU Make build under Linux... I haven't re-benchmarked since the CMake support became more mature.)
If doing this, remember not to download any untrusted content into these directories.
Will add this to the Eclipse Setup guide.You may find you get even better performance on Windows by choosing more than the "Optimal" number of jobs.
Currently Linux is significantly faster, to the extent that running Linux in a VM on a Windows host is significantly faster than building on the host.Has anyone done a performance test of a build on Linux compared to a build on Windows 10 for the same application/project?
Running parallel builds helps in Windows. However the slowness of Windows builds was a major reason for supporting CMake in IDF V3.2 (and migrating to CMake by default in IDF v4.0.) Building under CMake is still faster in Linux, but the difference is significantly less...
(When we were first previewing CMake, a full CMake+ninja build under Windows was approximately as fast as a GNU Make build under Linux, but a full CMake+ninja build under Linux was faster than a GNU Make build under Linux... I haven't re-benchmarked since the CMake support became more mature.)
Disabling Windows Defender entirely is an option if you don't mind disabling all spyware protection... A number of people have reported success by adding their MSYS32 directory (and any directory containing IDF files) to an "ignore" list for Windows Defender and/or other anti-virus programs.1. Regedit
2. Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
3. create key DisableAntiSpyware -> value 1
If doing this, remember not to download any untrusted content into these directories.
-
- Posts: 10
- Joined: Wed Sep 05, 2018 8:02 am
Re: The compilation is very slowly
thanks it works very well
Re: The compilation is very slowly
I have Win 10 Defender set to ignore my development directory. Because a build creates so many files it gets Defender really chugging if you don't. I've been developing for the last 8 months in windows using the -j8 (8 = number of threads in CPU, or 2 x # of cores), and I haven't found it to be so slow as to be a problem. I normally develop with a Win 7 computer, but my newest laptop has 10 and I use it for work occasionally.
John A
John A
-
- Posts: 7
- Joined: Mon Jul 16, 2018 6:04 am
Re: The compilation is very slowly
Hello,francescofcf wrote:thanks it works very well
When I modify this parameter I had an error.
IS it possible that you must indicate to the compiler the order of the files to do the compilation?
Best regards,
Juan
Re: The compilation is very slowly
No, the build system should support parallel builds already. What error did you get?Brattchess wrote:francescofcf wrote: When I modify this parameter I had an error.
IS it possible that you must indicate to the compiler the order of the files to do the compilation?
Who is online
Users browsing this forum: MicroController and 260 guests