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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor performance on html files #108

Open
jpramosi opened this issue Nov 22, 2024 · 0 comments
Open

Poor performance on html files #108

jpramosi opened this issue Nov 22, 2024 · 0 comments

Comments

@jpramosi
Copy link

Hello, at first I would like to thank you for the project!
I've found an issue with the html rewriter: The problem is a new regex is compiled every time lol-html its rewriter handler is called here.
Moving the regex instance to a static variable like here improves the rewriting time for an average html file from ~2 seconds to 50-200 milliseconds on some pages.
The result is that the initial page loads much faster with no noticeable delay.

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

No branches or pull requests

1 participant