-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parallel build uses only 1 core when compiling regular libraries #252
Comments
Hi Paul, |
I just tested with Wifi101 examples and it seems to parallelize also the library compilation. |
I tested with my audio library, which has 56 .cpp files. Running on Linux 64 bit, process monitor shows only ~1 CPU used. During the core library build, it shows about 10, but difficult to tell for sure because it does by so quickly. |
I know this is an old bug, but shows up on google for parallel builds. |
As of today, all source files of a "submodule" are compiled in parallel with N threads (N = core number), while all submodules are compiled in order. |
@facchinm thanks for the update. I've indeed noticed build times of 1mn or sometimes more on ESP32 code with lots of source files and libraries. It's vexing that my quad core computer indeed seemed to compile everything in such a serial fashion. |
@marcmerlin if you have a large core (like ESP32) and a lot of big libraries (like the ESP32 wifi ones) you should cap the 8 threads in almost every condition also with our approach. The problem arises if you have 100 libraries composed by 1 file each, which compiles as if |
@facchinm I guess I have both then (some slightly bigger libraries, but also many libraries). Maybe it's already close to going as fast as it can, it's hard to compare given that I don't have a button to click for "full parallelized across everything". |
Wow, the parallel build in arduino-PR-beta1.9-BUILD-22 makes an amazing speedup for compiling the core library.
But compiling normal libraries doesn't seem to do anything in parallel. Is that intentional? Hopefully parallel build can be applied to regular libraries. Some larger libraries have a tremendous amount of code which could really benefit.
The text was updated successfully, but these errors were encountered: