Perf: Avoid creation of intermediary array when iterating over style rules (#1272)

* Perf: Avoid creation of intermediary array when iterating over stylesheet rules by using the second `mapFn` argument of Array.from

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from

Performance analysis by: JonasBA <jonas@badalic.com>
Authored-by: Eoghan Murray <eoghan@getthere.ie>
This commit is contained in:
Eoghan Murray
2023-08-15 10:39:29 +01:00
committed by GitHub
parent 64420c7e46
commit 58c9104edd
3 changed files with 11 additions and 8 deletions

View File

@@ -0,0 +1,6 @@
---
'rrweb-snapshot': patch
'rrweb': patch
---
Perf: Avoid creation of intermediary array when iterating over style rules