Skip to content

Duplicate style node added hundreds of times #790

@rcmarron

Description

@rcmarron

Hey everyone,

We've been having an issue lately where style nodes get added hundreds of times to a recording, and it causes the recording to become massive.

I haven't figured out how to reliably reproduce the issue, but it happens occasionally on our web app (app.posthog.com) and on several of our customer's web apps. I can't share the entire recording because it's massive and includes PII, but here is a gist with a subset of the snapshots: https://gist.github.com/rcmarron/d473fc0e5aeae281fffd978d6cc121a6

A couple of notes/thoughts:

  • I've only seen it happen when really large nodes are added, but that's not to say it never happens with smaller nodes.
  • I'm wondering if adding nodes to the addedSet is slow/async when the node is large, so when the MutationObserver sends duplicates, they aren't properly de-duped?

Let me know if I can share any more details

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions