You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ZoneAwareError reads original stack despite setting __Zone_Error_ZoneJsInternalStackFrames_policy #43240
Which @angular/* package(s) are relevant/releated to the feature request?
No response
Description
Zone.js's ZoneAwareError always stores the original error's stack in the constructor by accessing error.stack no matter what the __Zone_Error_ZoneJsInternalStackFrames_policy is.
This can lead to performance overhead in V8 when using custom stack traces because the prepareStackTrace method runs uneccesarily when constructing errors even if the error's stack will never be accessed.
In our project we use the source-map-support package that provides source map support for stack traces. This can be a costy operation first time (seconds), which we want to avoid when the error's stack is never accessed.
Proposed solution
If possible only access the original error's stack if it is necessary regarding the __Zone_Error_ZoneJsInternalStackFrames_policy.
Activity
fix(zone.js): do not run stack formatting when the lazy stack frames …
BraianS commentedon May 14, 2024
Good morning, any update on this matter? Thanks.