Files
rrweb/.changeset/hungry-dodos-taste.md
Vinicius Lourenço 5e7943dbae perf(snapshot): avoid recreate element a every time (#1387)
perf(snapshot): avoid costly generation of <a> element on each call to `getHref`, instead cache an anchor element and reuse it's href attributed

---------

Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
2024-05-02 13:44:58 +01:00

211 B

rrweb-snapshot
rrweb-snapshot
patch

Avoid recreating the same element every time, instead, we cache and we just update the element.

Before: 779k ops/s After: 860k ops/s

Benchmark: https://jsbench.me/ktlqztuf95/1