Open
Description
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 globalsetTimeout
andclearTimeout
functions, which are monkeypatched by Angular and triggers their change detection. Promise
- Any
EventTarget
(e.g.window
,Performance
,Worker
)
Related to #11661