Page MenuHomePhabricator

Math caching recently broken
Closed, ResolvedPublic

Description

Recent upgrades (circa March 6, 2013 or a little before) seem to have broken the math caching system in some way.

The key symptom is that pages with many new / recently added equations take a very long time to save / preview. It appears that the math formulas are being repeatedly regenerated on each save even though they ought to be stored after the first run.

However, it also appears that old pages still render quickly. In other words, it appears that Mediawiki knows that previously cached formulas are still cached but it isn't placing new formulas into the caching system correctly.

Examples:

Good version with old formulas that renders quickly:

http://en.wikipedia.org/wiki/User:Dragons_flight/math1

Requires 1.1 s to preview

Bad version with new formulas that renders slowly:

http://en.wikipedia.org/wiki/User:Dragons_flight/math2

Requires 47.5 s to preview

Both times are based on the "served by" comment in the HTML source generated after preview. The only difference between the pages is that all instances of <math> ... </math> have been replaces with <math> ... = 1 </math> in the new version in order to create "new" equations.

Related complaints:

http://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=543209802#Posting_to_the_math_reference_desk_is_really_slow

http://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=543209802#Technical_difficulty_with_editing_ring_.28mathematics.29


Version: unspecified
Severity: major

Details

Reference
bz45973

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 1:35 AM
bzimport set Reference to bz45973.

(In reply to comment #0)

Bad version with new formulas that renders slowly:

http://en.wikipedia.org/wiki/User:Dragons_flight/math2

Requires 47.5 s to preview

I just checked, and: <!-- Served by mw1022 in 0.819 secs. -->

Is this still an issue? If so, how can I reproduce it?

(In reply to comment #2)

(In reply to comment #0)

Bad version with new formulas that renders slowly:

http://en.wikipedia.org/wiki/User:Dragons_flight/math2

Requires 47.5 s to preview

I just checked, and: <!-- Served by mw1022 in 0.819 secs. -->

Is this still an issue? If so, how can I reproduce it?

Sorry, my mistake: I forgot I had enabled MathJax recently.

Merged. Thanks again to Ori for tracking this down.

(In reply to comment #0)

Bad version with new formulas that renders slowly:

http://en.wikipedia.org/wiki/User:Dragons_flight/math2

Looks fine now.

https://gerrit.wikimedia.org/r/49488 (Gerrit Change Ic9e8ee7558e0496e3cffd4d3e8bea7a4c0c7d276) | change ABANDONED [by Physikerwelt]