From 2bf461e6f502b1135f66ceff96f79152eccf1dc7 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 aaf53b73c4..a8817ebacd 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -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])