This substantially reduces the time it takes to load a Whoops ever page, and time switching frame context.
Error page with 96 frames, tested with Laravel
Metric
Before PR
With PR
Improvement
Page load time
1600ms
900ms
+43%
Context switch time
4000ms
200ms
+95%
This is because prior to this PR syntax highlighting occurs on page load, and every single click for the whole page and all frames, even those that aren't visible. This PR syntax highlights only frames that are visible.
This substantially reduces the time it takes to load a Whoops ever page, and time switching frame context.
Error page with 96 frames, tested with Laravel
This is because prior to this PR syntax highlighting occurs on page load, and every single click for the whole page and all frames, even those that aren't visible. This PR syntax highlights only frames that are visible.
😁