denoland / rusty_v8

Rust bindings for the V8 JavaScript engine
https://crates.io/crates/v8
MIT License
3.39k stars 315 forks source link

Turn v8_enable_shared_ro_heap on #1265

Open ry opened 1 year ago

ry commented 1 year ago

We want to be inline with what default chrome configurations are using to reduce technical debt https://github.com/denoland/rusty_v8/blob/ca83ce53bad172cd1b5f1fcfbe18cb936cbb3b7f/.gn#L48-L52

Problem: there are two snapshots in deno, the main runtime one, and the tsc one. How can we turn this on and also handle both of those? maybe don't snapshot tsc?

mmastrac commented 1 year ago

We might be able to fork before starting the snapshots which might allow us to use two snapshots side-by-side (just not in the same process). The benefit here would likely be a drastic memory reduction for the workers.