ankitects/anki

Consider lazy-loading MathJax and CodeMirror in editor

Open

Aperta il 1 lug 2023

Vedi su GitHub
 (4 commenti) (1 reazione) (0 assegnatari)Rust (27.973 star) (2965 fork)batch import
editorhelp wantedweb frontend

Descrizione

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.

Guida contributor