-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Ember/V8: Slow EmberError constructor #15516
Comments
@schuay I believe our usage of |
We only do this for stack cosmetic reasons, it really just removes 1 or so frames, but apparently more recently at a hefty cost: context: #15516
|
is kinda funny bit-rot. Time to clean that up. |
We only do this for stack cosmetic reasons, it really just removes 1 or so frames, but apparently more recently at a hefty cost: context: #15516
We only do this for stack cosmetic reasons, it really just removes 1 or so frames, but apparently more recently at a hefty cost: context: #15516
We also do stack trace stuff herE: https://github.com/emberjs/ember.js/blob/master/packages/ember-debug/lib/deprecate.js#L81-L118 When we provide deprecations. These get hit quite abit, I wonder if we should log a deprecation sans stack, but provide via console message how to enable stacks... Thoughts @rwjblue ? |
We only do this for stack cosmetic reasons, it really just removes 1 or so frames, but apparently more recently at a hefty cost: context: #15516
I'm a bit confused by
It might also be easier for you to use |
By the way, |
Ya that code does look funky. I suspect needs some TLC, looking now |
LIkely just via the |
@schuay |
Ah this method, we must implement. I forgot about it :P |
thoughts on #15524 ? |
@schuay @stefanpenner is this still an issue, perhaps we should close, what do you think? |
I don't know what the current status is - have all fixes landed? |
I believe they have not landed, there were some strange test failures and I simply didn't have the time to debug them. |
I'm closing due to inactivity. If this is still relevant, please reopen! |
I heard through the grapevine that error handling is very slow when using current V8 versions (e.g. 6.0).
Looking at the
EmberError
constructor [0], the main offender is probably the call toError.captureStackTrace
.captureStackTrace
used to format the stack trace lazily on access to thestack
property (like builtin error objects), but since about a year it formats traces eagerly. That could be fairly expensive, and would explain a sudden slowdown in error handling code. We're looking into re-enabling lazy formatting inError.captureStackTrace
[1] soon.I also noticed that each call to the
EmberError
constructor collects the stack trace three times:super()
Error.call(this, message)
Error.captureStackTrace
.Maybe it'd be possible to avoid some of this useless work? In current V8 versions, it should be enough to just call
super(message)
- this will also filter to relevant frames (asError.captureStackTrace
does).[0]
ember.js/packages/ember-debug/lib/error.js
Line 32 in 0947407
[1] https://crbug.com/v8/5962
cc @hashseed, @bmeurer, @stefanpenner
The text was updated successfully, but these errors were encountered: