[Info] Improving build times with parallel makes
Posted: Fri Sep 30, 2016 4:33 am
I am running builds on a Raspberry Pi model 3 which has a quad core / 1GHz per core device. Performance is satisfactory but when I do a full build of everything from scratch, it can take 6 minutes plus. I noted that only 25% of my available CPU capacity was being used which makes sense ... it was basically pegging one CPU. When we run a build using "make" we can specify a "-j <num>" parameter.
See: https://www.gnu.org/software/make/manua ... allel.html
What this does is specify the number of "jobs" to run in parallel. On my Pi, I tested with:
and found that 100% of my CPU was consumed and the build completed in 50% of the time. I don't know if ESP-IDF is tolerant of parallel compilations but it seems to "sniff" out ok. You might want to try with different numbers of parallel jobs to see where you get the most return.
See: https://www.gnu.org/software/make/manua ... allel.html
What this does is specify the number of "jobs" to run in parallel. On my Pi, I tested with:
Code: Select all
$ times make -j 5