From bc66495061c9f92e796ea4127f163b9722d506bd Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 29 Apr 2017 23:48:03 +0200 Subject: [PATCH] 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 Reviewed-By: James M Snell Reviewed-By: Michael Dawson --- doc/api/vm.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/vm.md b/doc/api/vm.md index 3a98f59677866a..f1596c617a6ac2 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -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])