CodeMirror-MathJax
CodeMirror-MathJax copied to clipboard
Math editing performance
This is about editing math-heavy text in fully-initialized document; see #14 for init performance (though many improvements there would also help here).
- [ ] cache typeset DOM, reuse if text & token class didn't change.
- [ ] if changed, use jax methods like
.Text(newmath)http://docs.mathjax.org/en/latest/typeset.html#manipulating-individual-math-elements- [ ] use
.Rerender()if only token class changed.
- [ ] use
- [ ] be more precise in area to be updated.
Could Hub.Update() do the job instead a custom caching scheme?!
http://docs.mathjax.org/en/latest/api/hub.html#Update
Easy ways to test:
- select a big block and press Tab/Shift+Tab.
- all editing is painfully slow on Android (specifically, Firefox works well but slow).
https://github.com/benweet/stackedit/issues/25 has useful info.