Skip to content

Commit

Permalink
doc: document vm timeout option perf impact
Browse files Browse the repository at this point in the history
Mention that the `timeout` option has a noticeable performance impact.

Fixes: #10453
PR-URL: #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>
  • Loading branch information
addaleax committed May 3, 2017
1 parent 896be83 commit 2bf461e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/api/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ console.log(util.inspect(sandbox));
// { 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])
<!-- YAML
added: v0.3.1
Expand Down

0 comments on commit 2bf461e

Please sign in to comment.