From 8e961f592ddbb30f6cbd0acb309bbca3748f214d Mon Sep 17 00:00:00 2001 From: ksolana <110843012+ksolana@users.noreply.github.com> Date: Fri, 23 Aug 2024 22:40:33 -0700 Subject: [PATCH] Get faster compression level --fast=4 As per https://github.com/facebook/zstd/tree/dev?tab=readme-ov-file#benchmarks Level=4 offers faster compression 710MB/s vs. 670 MB/s --- runtime/src/snapshot_utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/src/snapshot_utils.rs b/runtime/src/snapshot_utils.rs index 1ff4c5096d0007..8a3593586f7d12 100644 --- a/runtime/src/snapshot_utils.rs +++ b/runtime/src/snapshot_utils.rs @@ -1084,7 +1084,7 @@ fn archive_snapshot( } ArchiveFormat::TarZstd => { let mut encoder = - zstd::stream::Encoder::new(archive_file, 0).map_err(E::CreateEncoder)?; + zstd::stream::Encoder::new(archive_file, 4).map_err(E::CreateEncoder)?; do_archive_files(&mut encoder)?; encoder.finish().map_err(E::FinishEncoder)?; }