0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2025-04-03 20:25:25 +00:00

buildsystem: avoid process forks to init dashboard status file

A typical image build will update the dashboard 3500-4500 times. This change
avoids two process forks (cat, wc) per update, and the remaining $(< file) is
faster than $(cat file).
This commit is contained in:
MilhouseVH
2019-05-29 00:56:10 +01:00
parent cd0e70eb65
commit aa7d22f05b
2 changed files with 6 additions and 2 deletions

@ -144,6 +144,7 @@ start_multithread_build() {
mkdir -p "${THREAD_CONTROL}/locks"
echo -1 >"${THREAD_CONTROL}/progress.prev"
echo 0 >"${THREAD_CONTROL}/progress"
echo 0 >"${THREAD_CONTROL}/status.max"
touch "${THREAD_CONTROL}/status"
[ "${THREADCOUNT}" = "0" ] && THREADCOUNT=1