Skip to content

Commit bc66495

Browse files
addaleaxMylesBorins
authored andcommitted
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 2724fe3 commit bc66495

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
@@ -116,6 +116,10 @@ console.log(util.inspect(sandbox));
116116
// { animal: 'cat', count: 12, name: 'kitty' }
117117
```
118118

119+
*Note*: Using the `timeout` or `breakOnSigint` options will result in new
120+
event loops and corresponding threads being started, which have a non-zero
121+
performance overhead.
122+
119123
### script.runInNewContext([sandbox][, options])
120124
<!-- YAML
121125
added: v0.3.1

0 commit comments

Comments
 (0)