Slow creation of vm contexts in Node 8Β #14229
Copy link
Copy link
Closed
Labels
duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.vmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.
Description
Activity
Thanks for the bug report but this is a known issue that is currently under discussion in #14171. It's caused by the disabling of snapshots in the recent security release.
Reacted by Gadzhi Gadzhiev and Hiroyuki Okada- addedduplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.vmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.
on Jul 14, 2017 I don't want to be the sad party guy, but with node 8.4 we still get the same results as 8.1 for the test mentioned in this issue. I'm not sure we can consider this issue as closed. Can you update the status? Do we need to manually enable the snapshots?
Reacted by Y. and Ashwin HegdeI can reproduce this.
On 8.1.2:
0s 0.795425ms 0s 0.444657ms 0s 0.490908ms 0s 0.361369ms 0s 0.375127ms 0s 0.37264ms 0s 0.389114ms 0s 0.416671ms 0s 0.418107ms 0s 0.74983msOn 8.2.1:
0s 13.092423ms 0s 11.660271ms 0s 16.616345ms 0s 11.610915ms 0s 16.744768ms 0s 12.447443ms 0s 17.539571ms 0s 13.936142ms 0s 14.693775ms 0s 12.543202msOn 8.4.0:
0s 10.069914ms 0s 11.56193ms 0s 16.3576ms 0s 11.73263ms 0s 12.540824ms 0s 11.446461ms 0s 13.451929ms 0s 13.972611ms 0s 11.094361ms 0s 15.203506msSeems like it was a bug in our build system that caused this :(
It will be fixed in #14875.
Reacted by Anna HenningsenReacted by Aurelien Ribon
Metadata
Metadata
Assignees
Labels
duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.vmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.
v8.1.4Linux stbx-frontend-dev 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014 x86_64 x86_64 x86_64 GNU/LinuxIt looks like process of creating new contexts got much slower in recent nodejs release.
Consider following example:
Here we're creating new context for each run and executing empty code string.
Output for nodejs 8.1.4:
Output for nodejs 6:
However, if we're reusing one context instead of creating new ones (like this), everything except first run is ok in nodejs 8 too:
Basically, slow part is
vm.createContext, code execution speed itself is fine (benchmark with justvm.createContext({})shows similar timings).It looks like this problem exists only on Linux (
node v8.1.2onDarwin resure-osx 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64is as fast as node 6).