luci-mod-system/zram: replace deflate with zstd
authorRui Salvaterra <[email protected]>
Tue, 2 Mar 2021 09:31:22 +0000 (09:31 +0000)
committerRui Salvaterra <[email protected]>
Sun, 14 Mar 2021 12:24:15 +0000 (12:24 +0000)
commit02cadf67b23806b37ea71c0a16459876817b337b
tree6ad1ce39b1ad926881765cb930f57fb200edbd3a
parentaa439dbed7be369a9d6d3f9dd05c425cf363df32
luci-mod-system/zram: replace deflate with zstd

Deflate is just too slow for zram. Replace it with zstd, which is much faster at
similar compression ratios.

As a side note, this is an ugly hack. We're hard-coding compression algorithms
which might not be available in the system. The availability should be parsed
from /sys/block/zram0/comp_algorithm.

Signed-off-by: Rui Salvaterra <[email protected]>
modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js