Files
rrweb/.changeset/thin-vans-applaud.md
Eoghan Murray 07ac5c9e13 Masking: Avoid the repeated calls to closest when recursing through the DOM (#1349)
* masking performance: avoid the repeated calls to `closest` when recursing through the DOM
 - needsMask===true means that an ancestor has tested positively for masking, and so this node and all descendents should be masked
 - needsMask===false means that no ancestors have tested positively for masking, we should check each node encountered
 - needsMask===undefined means that we don't know whether ancestors are masked or not (e.g. after a mutation) and should look up the tree
* Add tests including an explicit characterData mutation tests 
* Further performance improvement: avoid calls to `el.matches` when on a leaf node, e.g. a `<br/>`
---------

Authored-by: eoghanmurray <eoghan@getthere.ie>
Based on initial PR #1338 by Alexey Babik <alexey.babik@noibu.com>
2023-11-24 16:06:02 +00:00

157 B

rrweb-snapshot, rrweb
rrweb-snapshot rrweb
patch patch

Snapshot performance when masking text: Avoid the repeated calls to closest when recursing through the DOM