-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Performance issues for pageload #761
Comments
Don't have any Nexus to investigate this. But if you're concerned with the performance, you should probably consider loading Prism asynchronously and running the highlighting by yourself. |
The problem isn't specific to the Nexus, it is devices with slow CPUs (all smartphones and tablets), because you have so much initialization that are very CPU heavy. But i hear you, you don't want to change that (which is fair), so i will play with som async loading, or change framework. |
Don't get me wrong: you are very welcome to suggest any optimisation you think could improve the performance on such devices. You are also welcome to point at some specific CPU heavy initialization you think could be improved. |
Not sure if that helps in your case but I've rewritten the tokenizing part of prism as it was too slow and unstable with large files : https://github.com/siemiatj/prism-lite . It comes with some drawbacks but maybe this won't be a problem for you. |
Hey there, thanks for working on Prism! |
Without any more specific information, I'm afraid there is nothing we can do about this. I'm closing the issue. |
With the following languages loaded, is the performance very bad for the critical pageload time on mobile, here a Nexus 4 running Chrome. 4.3 seconds are added to the page load time. This example is on a page with no highlighting.
With a fewer number of languages the performance is better, but the page still takes more than 500ms longer to load, on a page with no highlighting.
The text was updated successfully, but these errors were encountered: