PrismJS extremely slow
Closed this issue · 1 comments
krystianmagdziarz commented
Hi,
What I can do to increase loading time prism.js file on the frontend?
According to Google Speed Insight it takes 3 383 ms to load this file.
FlipperPA commented
It's a tricky problem. I include the entire payload of PrismJS so support all languages, line numbers, and so on.
If you only want to support a few languages, you could go to the PrismJS website and build your own, only including those languages. Then create a yourapp/static/js/prism.min.js
within one of your other apps that is included in INSTALLED_APPS
before wagtailcodeblock
.
See this answer on Stack Overflow for more details: https://stackoverflow.com/questions/21982260/how-to-override-grappelli-js-file-in-django