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
This came out of a discussion #5851 (comment) in a PR that tried to resolve this issue: #2809
We had/have a gap in our normalization process and merged #5851 which is actually a very drastic change for a problem that probably shouldn't exist in the first place. Instead of blanket normalizing everything, we should be very specific in what we normalize - for that however, we need to know where we're missing normalization. That PR is a temporary solution at best because of the performance penalty it introduces.
How
We evaluated different approaches on finding the normalization gap:
Capture an additional exception here with the circ-dep path and let users report back to us.
Set a specific field in extra and show a warning on the Sentry product to report back to us.
Set a specific field in the payload with the circ-dep path and log that field in relay.
Left for us to do is decide what to do and then implement it.
The text was updated successfully, but these errors were encountered:
It might be worth using structuredClone since this is native and is likely to be the fastest way to remove circular dependencies in modern browsers:
The structured clone algorithm copies complex JavaScript objects. It is used internally when invoking structuredClone(), to transfer data between Workers via postMessage(), storing objects with IndexedDB, or copying objects for other APIs.
It clones by recursing through the input object while maintaining a map of previously visited references, to avoid infinitely traversing cycles.
structuredClone throws when it encounters Functions and DOM nodes so they'd need to be stripped out first.
I've just read the docs again and the circular references are preserved in the output, it just ensures that circular references don't cause infinite traversing.
Why
This came out of a discussion #5851 (comment) in a PR that tried to resolve this issue: #2809
We had/have a gap in our normalization process and merged #5851 which is actually a very drastic change for a problem that probably shouldn't exist in the first place. Instead of blanket normalizing everything, we should be very specific in what we normalize - for that however, we need to know where we're missing normalization. That PR is a temporary solution at best because of the performance penalty it introduces.
How
We evaluated different approaches on finding the normalization gap:
extra
and show a warning on the Sentry product to report back to us.Left for us to do is decide what to do and then implement it.
The text was updated successfully, but these errors were encountered: