Skip to content

Conversation

devversion
Copy link
Contributor

If we are seeing too many object iterations, we know something is off. This can happen when we are seeing e.g. large linked lists where every element recursively has access to the full list again. This will not quickly yield circular early bail-outs, but instead result in the stringification to take LOTS of processing time and results in browser crashes. We should limit object iterations for this reason, and instead expect people to inspect such logs in the browser directly.

Without having looked too much into this, I believe this also is confirmed by the issue reported below; where attaching to document.body causes the crashes & CPU consumption. The DOM is basically a similarly structured object that can result in many repetitions of "linked lists" that aren't necessarily circular in the current "serialization path".

Related #2798.

…bjects

If we are seeing too many object iterations, we know something is off. This can
happen when we are seeing e.g. large linked lists where every element recursively
has access to the full list again. This will not quickly yield circular early bail-outs,
but instead result in the stringification to take LOTS of processing time and results
in browser crashes. We should limit object iterations for this reason, and instead expect
people to inspect such logs in the browser directly.

Related modernweb-dev#2798.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant