-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow creation of vm contexts in Node 8 #14229
Comments
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. |
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? |
I can reproduce this. On 8.1.2:
On 8.2.1:
On 8.4.0:
|
Seems like it was a bug in our build system that caused this :( It will be fixed in #14875. |
v8.1.4
Linux 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/Linux
It 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.2
onDarwin 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_64
is as fast as node 6).The text was updated successfully, but these errors were encountered: