-
-
Notifications
You must be signed in to change notification settings - Fork 37.2k
VM: VM is much slower when timeout was specified #10453
Copy link
Copy link
Closed
Labels
docIssues and PRs related to Node.js documentation.Issues and PRs related to Node.js documentation.performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js.questionIssues asking questions about Node.js.Issues asking questions about Node.js.vmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.
Description
Activity
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to Node.js documentation.Issues and PRs related to Node.js documentation.performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js.questionIssues asking questions about Node.js.Issues asking questions about Node.js.vmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.
Node.js v6.7.0 / Node.js 4.4.2
Ubuntu 14.04 LTS x64 (v6.7.0) / macOS Sierra (v4.4.2)
VM
I just found there's unexpected behavior on
timeoutoption ofvm.runInContext.When
timeoutoption was specified, Script execution on VM is much slower thentimeoutoptions wasn't specified.This is two of example snippets to reproduce that problem:
vm-normal.js
vm-with-timeout.js
I think maybe that's not a bug (timer for timeout is expansive?), but that's unexpected behavior. It would be nice if that limitation should be documented on VM API documentation.