ankitects/anki
View on GitHubConsider lazy-loading MathJax and CodeMirror in editor
Open
#2,563 opened on Jul 1, 2023
editorhelp wantedweb frontend
Description
MathJax appears to account for about 1/3rd of our (2.9MB large!) editor bundle, and codemirror appears to be the second-largest contributor. If we were able to lazy-load these as required, we may be able to improve editor startup time for users who don't use MathJax or the HTML editor by default. We're also using the full MathJax bundle - maybe there's a way to lazy-load the required parts? A good starting point would be to just strip them out and compare editor loading time before and after, to see what sort of performance gains there are.