From e0b55f0f58931e67008d317855cadeb9d59fccbf Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Tue, 18 Feb 2025 12:26:27 +0100 Subject: Disable compression for OGG files Compressing OGG files makes little sense (I'm seeing a 1.3% increase in file size for TMW-music.zip with compression disabled) but the need for decompressing these relatively large files is causing a noticeable stutter when the Mana client switches music. Without compressing OGG files, the `Mix_LoadMUS_RW` call still takes about 45ms, so the stutter isn't gone entirely unfortunately. But previously it could take over 250ms, depending on the song. See https://git.themanaworld.org/mana/mana/-/issues/93 --- client/make-updates.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/make-updates.sh b/client/make-updates.sh index dba3bde..9c94d59 100755 --- a/client/make-updates.sh +++ b/client/make-updates.sh @@ -67,10 +67,10 @@ if [ "$UPDATE_HTTP" == "none" ] ; then fi echo -e "\e[96m>> Compressing files...\e[0m" -find -path ./music -prune -o -path ./mods -prune -o -iregex ".+[.]\(xml\|png\|jpg\|tmx\|ogg\|txt\|po\|tsx\)" -printf "%P\n" | zip -X -@ $dir/files/TMW.zip -find -path ./sfx -prune -o -path ./mods -prune -o -iregex ".+[.]\(ogg\)" -printf "%P\n" | zip -X -@ $dir/files/TMW-music.zip +find -path ./music -prune -o -path ./mods -prune -o -iregex ".+[.]\(xml\|png\|jpg\|tmx\|ogg\|txt\|po\|tsx\)" -printf "%P\n" | zip -X -@ -n .ogg $dir/files/TMW.zip +find -path ./sfx -prune -o -path ./mods -prune -o -iregex ".+[.]\(ogg\)" -printf "%P\n" | zip -X -@ -0 $dir/files/TMW-music.zip #find ./mods -printf "%P\n" | zip -X -@ $dir/files/TMW-mods.zip -find ./mods -type f | xargs zip -9 -r $dir/files/TMW-mods.zip +find ./mods -type f | xargs zip -9 -r -n .ogg $dir/files/TMW-mods.zip touch $dir/files/TMW-music.zip touch $dir/files/TMW-mods.zip -- cgit v1.2.3-70-g09d2