Avidemux Forum

Avidemux => Unix-Like (Linux/Bsd/...) => Topic started by: eumagga0x2a on September 06, 2016, 06:15:39 PM

Title: [build] Set number of job slots automatically to the number of CPU cores
Post by: eumagga0x2a on September 06, 2016, 06:15:39 PM
Currently the max. number of make recipes executed in parallel is hardcoded as 2 in bootStrap.bash:19. I guess it is safe to set this limit automatically to the number of CPU cores, isn't it?

diff --git a/bootStrap.bash b/bootStrap.bash
index d4ea659..ce4e8d9 100644
--- a/bootStrap.bash
+++ b/bootStrap.bash
@@ -16,7 +16,7 @@ debug=0
qt_ext=Qt5
QT_FLAVOR="-DENABLE_QT5=True"
export QT_SELECT=5 # default for ubuntu, harmless for others
-export O_PARAL="-j 2"
+export O_PARAL="-j $(nproc)"
fail()
{
         echo "** Failed at $1**"
Title: Re: [build] Set number of job slots automatically to the number of CPU cores
Post by: eumagga0x2a on September 08, 2016, 06:47:41 PM
Committed as [Build] Use the number of core as reported by ncore (euma) (https://github.com/mean00/avidemux2/commit/9269f721775a171c0486496c5b62f36ebdfef704), thanks!