Skip to content

Commit 21abd24

Browse files
Refactor compression options in profiledef.sh for better clarity and performance on multi-core systems
1 parent 13eeb46 commit 21abd24

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

profiledef.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito'
1414
arch="x86_64"
1515
pacman_conf="pacman.conf"
1616
airootfs_image_type="squashfs"
17-
# Use better compression options correctly formatted for mksquashfs
17+
18+
# Use better compression options correctly formatted for mksquashfs with XZ
19+
# XZ compressor supports these options: -Xbcj and -Xdict-size
1820
if [ "$(nproc)" -gt 2 ]; then
19-
# For multi-core systems: use XZ with bcj x86 filter and multi-threaded compression
20-
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M' '-Xcompression-level' '9')
21-
else
22-
# For single/dual-core systems: use faster but less effective compression
21+
# For multi-core systems: use XZ with bcj x86 filter for better compression
2322
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M')
23+
else
24+
# For single/dual-core systems: use the same options but may be slower
25+
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '75%')
2426
fi
27+
2528
bootstrap_tarball_compression=('zstd' '-c' '-T0' '--auto-threads=logical' '--long' '-19')
2629
file_permissions=(
2730
["/etc/shadow"]="0:0:400"

0 commit comments

Comments
 (0)