Browse Source

doc: document vm timeout option perf impact

Mention that the `timeout` option has a noticeable performance impact.

Fixes: https://github.com/nodejs/node/issues/10453
PR-URL: https://github.com/nodejs/node/pull/12751
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
v6
Anna Henningsen 8 years ago
parent
commit
2bf461e6f5
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 4
      doc/api/vm.md

4
doc/api/vm.md

@ -125,6 +125,10 @@ console.log(util.inspect(sandbox));
// { animal: 'cat', count: 12, name: 'kitty' } // { animal: 'cat', count: 12, name: 'kitty' }
``` ```
*Note*: Using the `timeout` or `breakOnSigint` options will result in new
event loops and corresponding threads being started, which have a non-zero
performance overhead.
### script.runInNewContext([sandbox][, options]) ### script.runInNewContext([sandbox][, options])
<!-- YAML <!-- YAML
added: v0.3.1 added: v0.3.1

Loading…
Cancel
Save