ankitects/anki

Consider lazy-loading MathJax and CodeMirror in editor

Ouverte

#2 563 ouverte le 1 juil. 2023

 (5 commentaires) (1 réaction) (0 personne assignée)Rust (2 965 forks)batch import
editorhelp wantedweb frontend

Métriques du dépôt

Stars
 (27 973 étoiles)
Métriques de merge PR
 (Merge moyen 4j) (68 PRs mergées en 30 j)

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.

Guide contributeur