diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2023-11-11 09:01:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-11 17:01:48 +0000 |
commit | 9f4a45561f4a01019cdbff86e2056de0296e791b (patch) | |
tree | a9c2c4b1664d6f4640115345882ae068c1a5a216 /cli/build.rs | |
parent | 56e76242f3d7082e412bc698ebc737d24910cb60 (diff) |
perf: snapshot runtime ops (#21127)
Closes https://github.com/denoland/deno/issues/21135
~1ms startup time improvement
---------
Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
Diffstat (limited to 'cli/build.rs')
-rw-r--r-- | cli/build.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cli/build.rs b/cli/build.rs index 3c56af599..1c27e6ebb 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -392,6 +392,20 @@ fn create_cli_snapshot(snapshot_path: PathBuf) -> CreateSnapshotOutput { deno_fs::deno_fs::init_ops::<PermissionsContainer>(fs.clone()), deno_node::deno_node::init_ops::<PermissionsContainer>(None, fs), deno_runtime::runtime::init_ops(), + deno_runtime::ops::runtime::deno_runtime::init_ops( + "deno:runtime".parse().unwrap(), + ), + deno_runtime::ops::worker_host::deno_worker_host::init_ops( + Arc::new(|_| unreachable!("not used in snapshot.")), + None, + ), + deno_runtime::ops::fs_events::deno_fs_events::init_ops(), + deno_runtime::ops::os::deno_os::init_ops(Default::default()), + deno_runtime::ops::permissions::deno_permissions::init_ops(), + deno_runtime::ops::process::deno_process::init_ops(), + deno_runtime::ops::signal::deno_signal::init_ops(), + deno_runtime::ops::tty::deno_tty::init_ops(), + deno_runtime::ops::http::deno_http_runtime::init_ops(), cli::init_ops_and_esm(), // NOTE: This needs to be init_ops_and_esm! ]; |