diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-08 11:44:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-08 21:14:04 +0530 |
commit | 0e8fc4dc6cc5bb089be56bda4935b24e0dc5328f (patch) | |
tree | 618bf2c07ba43716a533e567526d4381b3171b5f /cli/build.rs | |
parent | 88b5fd90880b78498d0bbbdec6342b3db5887ef1 (diff) |
Revert "perf: disable snapshot compression (#18061)" (#18074)
This reverts commit d12b039e1ad601622c6135e13f00fd14cb09bce1.
It was landed as an experiment and it confirms much faster startup
if not compression is applied.
Diffstat (limited to 'cli/build.rs')
-rw-r--r-- | cli/build.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cli/build.rs b/cli/build.rs index ddcd08778..956293b78 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -378,7 +378,14 @@ fn create_cli_snapshot(snapshot_path: PathBuf) { startup_snapshot: Some(deno_runtime::js::deno_isolate_init()), extensions, extensions_with_js, - compression_cb: None, + compression_cb: Some(Box::new(|vec, snapshot_slice| { + lzzzz::lz4_hc::compress_to_vec( + snapshot_slice, + vec, + lzzzz::lz4_hc::CLEVEL_MAX, + ) + .expect("snapshot compression failed"); + })), snapshot_module_load_cb: None, }) } |