Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up syntax highlighting #758

Merged
merged 1 commit into from Jul 13, 2023
Merged

Conversation

garygreen
Copy link
Contributor

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.

馃榿

@denis-sokolov denis-sokolov merged commit b5e231c into filp:master Jul 13, 2023
10 checks passed
@denis-sokolov
Copy link
Collaborator

Thank you, this is an awesome thing to find! Also thank you for a clean PR with a good description!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants