Skip to content

Commit 2bf461e

Browse files
committed
doc: document vm timeout option perf impact
Mention that the `timeout` option has a noticeable performance impact. Fixes: #10453 PR-URL: #12751 Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 896be83 commit 2bf461e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/vm.md

+4
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ console.log(util.inspect(sandbox));
125125
// { animal: 'cat', count: 12, name: 'kitty' }
126126
```
127127

128+
*Note*: Using the `timeout` or `breakOnSigint` options will result in new
129+
event loops and corresponding threads being started, which have a non-zero
130+
performance overhead.
131+
128132
### script.runInNewContext([sandbox][, options])
129133
<!-- YAML
130134
added: v0.3.1

0 commit comments

Comments
 (0)