ankitects/anki

Consider lazy-loading MathJax and CodeMirror in editor

Aberta

#2.563 aberto em 1 de jul. de 2023

 (5 comentários) (1 reação) (0 responsável)Rust (2.965 forks)batch import
editorhelp wantedweb frontend

Métricas do repositório

Stars
 (27.973 estrelas)
Métricas de merge de PR
 (Mesclagem média 4d) (68 fundiu PRs em 30d)

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.

Guia do colaborador