feat: Optimize parallelization even further

This commit is contained in:
Carlos Solís 2025-01-28 03:10:46 +00:00
parent 847a6337ad
commit bcaf777b20

View file

@ -50,21 +50,16 @@ then
sudo -u "${user}" bin/console movetoavatarcache | sudo tee "${tmpfile}" #&> /dev/null sudo -u "${user}" bin/console movetoavatarcache | sudo tee "${tmpfile}" #&> /dev/null
fi fi
grep -e "https://${site}/${avatarfolder}/" "${tmpfile}" | sed -e "s/.*${site}/${folderescaped}/g" -e "s/?ts=.*//g" | ( grep -e "https://${site}/${avatarfolder}/" "${tmpfile}" | sed -e "s/.*${site}/${folderescaped}/g" -e "s/?ts=.*//g" | (
while read -r n while read -r i
do do
find "${folder}/${avatarfolder}" -path "${n}" -type f | ( for p in "${i}" "${i//-320/-80}" "${i//-320/-48}"
while read -r i do
do loop_1 "${p}" &
for p in "${i}" "${i//-320/-80}" "${i//-320/-48}" if [[ $(jobs -r -p | wc -l) -ge $(getconf _NPROCESSORS_ONLN) ]]
do then
loop_1 "${p}" & wait -n
if [[ $(jobs -r -p | wc -l) -ge $(getconf _NPROCESSORS_ONLN) ]] fi
then done
wait -n
fi
done
done
)
done done
) )
wait wait