10

On Worldbuilding, I've suggested that we think about getting the mhchem extension for MathJax, and while many of us agree that it would be great to have, we're concerned if there would be any drawbacks to having it.

By "drawbacks", I mean something along the lines of "Using mhchem would slow down loading pages by ten seconds" (ridiculous, but it gets the point across).

Are there any technical downsides to using the mhchem extension?

This assumes, by the way, that MathJax is already enabled.

3
  • 1
    Browsing through the linked meta post, it seems that chemistry.SE has already used it. Probably the reason why it's not enabled in all MathJax-enabled sites, is because it's not needed for general case. Jul 20 '15 at 4:48
  • 2
    Yes, there is a downside: Every once in a while, you gotta see bug reports about it not rendering properly. Other than that, not really, it rocks.
    – M.A.R.
    Jul 20 '15 at 5:56
  • It should not make any difference, since it is basically just another library that is included in the MathJax base. The rendering of the formulas heavily depend on how much MathJax is used. You can switch it on locally with the $\require{mhchem}$ command. Jul 21 '15 at 6:46
4

Nick Craver explained the perfomance impact of MathJax a while ago:

See for yourself, here's are direct links to the tests. These are the numbers for the first visit (uncached) views of the homepage:

That's a significant performance penalty, even when "it's not doing anything". We're talking about a 21.3% increase in page load time for a user first hitting the site.

There's also a visible delay for processing MathJax on most devices, and this can be rather large depending on the amount of math on the page and the speed of the device and browser.

4
  • 6
    Worldbuilding already has MathJax enabled, the question is whether there are downsides of adding mhchem extension.
    – user259867
    Jul 20 '15 at 14:37
  • @NormalHuman There's probably no significant impact for that. Enabling the mhchem extension is something that should be requested on the per-site meta, I doubt it would be denied Jul 20 '15 at 15:07
  • 1
    @MadScientist he did request it on the per-site meta, and we asked about possible downsides and he brought that question here. The actual request to enable will be handled there, but we needed more information. Jul 20 '15 at 18:12
  • 3
    @MadScientist, there were some problems with the tests that you cite. One was that they were performed at a time when MathJax was in beta test for a release, and the tests used beta.mathjax.org rather than cdn.mathjax.org. The beta site was new and its DNS entry was not well established, which caused unusually long DNS lookup delays. Tests with the cdn.mathjax.org (and no math) showed much lower load times that were more in line with non-MathJax sites. Jul 21 '15 at 8:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .