MathJax 3 upgrade interest?

At the conference, @omar mentioned to me that MathJax 3 was a complete overhaul of the library that significantly improves performance, reducing render times by as much as 80% in some cases. But it’s also not entirely backwards compatible with 2.x, making the upgrade non-trivial.

Is anyone currently looking into this? Are there compelling author-facing features that you’d want to use that only appear in 3.x?

3 Likes

@navin could talk about this.

See feat!: upgrade to mathjax v3 by navinkarkera · Pull Request #33555 · openedx/edx-platform · GitHub

2 Likes

@dave We did implement the changes required to upgrade MathJax to 3.x in the above linked PR but we had to postpone work on it due to requirement of supporting multiple versions of MathJax via course level advanced settings which is not trivial.

@jristau1984 Since we started this upgrade work as part of Buglist project, I would like to hear your thoughts.

1 Like

Thanks @dave. I think we should ping people who uses MathJax the most including 2U authors and MIT team (@pdpinch). We need to make sure they’re at least aware of the changes and whether we’ll need to keep the deprecated version behind an off-by-default feature flag for a release or two to cater for breaking changes we’re not aware of.

I’ve added few notes but so far the work looks good.

@navin: Was the extra work mostly concerned about the coding side of things, or was there concern that there’d be a lot of bug fixing cycles on this as part of a gradual rollout? Or both? I’m curious about how much effort you think remains to land that work.

Jeff Witt summarized his expectations here: fix: Upgraded Mathjax version from 2.7 to 3.0.1 by Yagnesh1998 · Pull Request #32418 · openedx/edx-platform · GitHub.

This is the guidance we were working under, and with the hours available in what Navin was referencing, it did not fit.

I forgot that MathJax 4.0 was already in beta. Does it make sense to wait for that to land and try to go straight from 2.x → 4.x?

@dave Due to the complete rewrite of mathjax in v3 and change in the way of queuing operations gradual upgrade would mean supporting both versions with completely separate sections of code so yes it includes time for coding as well as fixing lot of bugs.

I forgot that MathJax 4.0 was already in beta. Does it make sense to wait for that to land and try to go straight from 2.x → 4.x?

Yes, but do we also add support for other versions as mentioned in Jeff Witt’s comment.