-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Major performance regression from 6.10.2 to 7.x and 8.0.0-test #13048
Comments
Did you |
@bnoordhuis Indeed I did:
I've added the log as a gist here. |
You mentioned you saw similar numbers on a different system? What does the profile look like on that system? Apropos the gist:
If you don't see that with node 6, that would be a good place to start looking. |
I forgot to mention, |
I will try and get profiles from Travis uploaded as build artifacts (the ones above come from my local Windows 10 system).
I don't see that in the logs for Node 6 or 7, but disabling that part of the code doesn't seem to bring the wall-clock times appreciably closer. Will look at |
What looks different in the Node 8
and
Both lines are should_utils merge is defined as: function merge(a, b) {
if (a && b) {
for (var key in b) {
a[key] = b[key];
}
}
return a;
} Commenting out the calls to I can try and minimise a test case if needed. |
It would be interesting to see if this testcase is reproducable: var should = require('should'); //11.2.0
for (var i=0;i<10000;i++) {
true.should.not.throw();
} Windows 10 w/ Node 6 around 3.6s, w/ Node 8 around 12.5s. |
That seems reproducible to me. |
The loop contents may be an abuse of i.should.not.be.type('string'); I wonder if we're hitting this V8 bug ? |
Possibly related to #11343 which indicates a fix has landed in v8. |
Could someone help me determine which release of v8 includes commit 989d7b96f8352b502e2ede62e0b105e143d03837 and when this version is likely to be incorporated into a Node.js release? |
GitHub shows you all the branches that contain this commit if you follow this link: v8/v8@989d7b9. It's right under the commit message. |
Original commit message: [error] Lazy stack trace formatting for Error.captureStackTrace This reinstates the old behavior of Error.captureStackTrace prior to 4feafee9d9. Like the builtin Error constructors, captureStackTrace now formats the stack trace lazily once it is accessed. Bug: v8:5962 Change-Id: I03821b73d26b7b40809a1fea98f9c820bfa05d6b Reviewed-on: https://chromium-review.googlesource.com/574530 Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{nodejs#46727} Fixes: nodejs#13048 Fixes: nodejs#11343
The fix is already in master and this will be fixed in probably the next release. I am closing this therefore. |
I'm seeing a major performance regression from Node 6.x (e.g. 6.10.2) to all versions of Node 7.x and v8.0.0-test20170511830c4bf319.
The application is the test-suite of swagger2openapi which converts a JS object from one schema to another, then validates using
ajv
and theshould
assertion library.I know travis isn't a benchmarking environment, but the results are consistent.
When I try to profile converting a single file (which shows around a 100% increase in execution time), both Node 7.0.0 and v8.0.0-test20170511830c4bf319 show almost all the time as unaccounted.
Node8 profiling results
What can I do to narrow-down the problem so I can produce a minimal test-case? My antivirus suite excludes the whole directory containing the versions of node.exe and the running code.
Are there any major anti-patterns which are likely to trigger much worse performance in 7.x and above?
The text was updated successfully, but these errors were encountered: