diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-21 18:53:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-21 17:53:46 +0000 |
commit | 0d27de943a60f5ca60e2116648719c235163361a (patch) | |
tree | 6c33d632db58846ebd15e7c89bff930a691058e4 /cli/build.rs | |
parent | 2ef8269fdb395b0736153ff5fbb9696cbb976e42 (diff) |
perf: disable TSC snapshot compression (#18333)
This commit disables compression of the TSC snapshot.
The compression only decreased the size of snapshot by 0.5Mb
and it took about 40s during release build to compress.
With recent gains in TS 5.0 upgrade in terms of size and performance
it makes sense to remove this compression.
Diffstat (limited to 'cli/build.rs')
-rw-r--r-- | cli/build.rs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/cli/build.rs b/cli/build.rs index ecd7ed1be..251b30de2 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -270,22 +270,7 @@ mod ts { build_libs, path_dts, )], - - // NOTE(bartlomieju): Compressing the TSC snapshot in debug build took - // ~45s on M1 MacBook Pro; without compression it took ~1s. - // Thus we're not not using compressed snapshot, trading off - // a lot of build time for some startup time in debug build. - #[cfg(debug_assertions)] compression_cb: None, - - #[cfg(not(debug_assertions))] - compression_cb: Some(Box::new(|vec, snapshot_slice| { - eprintln!("Compressing TSC snapshot..."); - vec.extend_from_slice( - &zstd::bulk::compress(snapshot_slice, 22) - .expect("snapshot compression failed"), - ); - })), snapshot_module_load_cb: None, }); } |