Skip to content

Angular change detection problems in Replay #12443

Open
@billyvg

Description

@billyvg

Angular monkeypatches browser APIs so that when they are called, will trigger Angular's change detection. This means that our SDK can end up causing customer applications to unnecessarily re-render, which in turn causes our Replay SDK to perform more work and can even cause performance regressions.

Some example areas where this happens:

  • In the rrweb-snapshot package, snapshot.ts is using the global setTimeout and clearTimeout functions, which are monkeypatched by Angular and triggers their change detection.
  • Promise
  • Any EventTarget (e.g. window, Performance, Worker)

Related to #11661

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions