Skip to content

Commit db4632c

Browse files
torvic9masahir0y
authored andcommitted
Makefile: use smaller dictionary size for xz module compression
By default, xz without parameters uses a dictionary size of 8 MB. However, most modules are much smaller than that. The xz manpage states that 'increasing dictionary size usually improves compression ratio, but a dictionary bigger than the uncompressed file is waste of memory'. Use a dictionary size of 2 MB for module compression, resulting in slightly higher compression speed while still maintaining a good compression ratio. Signed-off-by: Tor Vic <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent fa1e160 commit db4632c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ ifdef CONFIG_MODULE_COMPRESS
10531053
mod_compress_cmd = $(KGZIP) -n -f
10541054
endif # CONFIG_MODULE_COMPRESS_GZIP
10551055
ifdef CONFIG_MODULE_COMPRESS_XZ
1056-
mod_compress_cmd = $(XZ) -f
1056+
mod_compress_cmd = $(XZ) --lzma2=dict=2MiB -f
10571057
endif # CONFIG_MODULE_COMPRESS_XZ
10581058
endif # CONFIG_MODULE_COMPRESS
10591059
export mod_compress_cmd

0 commit comments

Comments
 (0)