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 authored and gibfahn committed Jun 18, 2017
1 parent f607d85 commit 5bb42d6
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 @@ -116,6 +116,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 5bb42d6

Please sign in to comment.