Fix performance of splitCssText (#1615)
- Fix bug where the right split point was not being picked for the 3rd section onwards - Fix that it wasn't able to find a split when both halves were identical - Add test to put splitCssText through it's paces with a large file - Introduce a limit on the iteration which causes the 'efficiently' test to fail - Fix poor 'crawling' performance in the 'matching' algorithm for large css texts - e.g. for a (doubled) benchmark.css, we were running `normalizeCssText` 9480 times before `k` got to the right place - Further algorithm efficiency: need to take larger jumps; use the scaling factor to make better guess at how big a jump to make
This commit is contained in:
6
.changeset/efficiently-splitCssText-1603.md
Normal file
6
.changeset/efficiently-splitCssText-1603.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"rrweb-snapshot": patch
|
||||
"rrweb": patch
|
||||
---
|
||||
|
||||
Improve performance of splitCssText for <style> elements with large css content - see #1603
|
||||
Reference in New Issue
Block a user