Jdlrobson renamed this task from "ext.math.styles is sometimes loaded when not needed - causing CSS size in production to fluctuate" to "ext.math.styles is sometimes loaded when not needed - causing CSS size in production to fluctuate - parser cache pollution?".
Jdlrobson added projects: Parsing-Team, Wikidata.
Jdlrobson updated the task description. (Show Details)

CHANGES TO TASK DESCRIPTION
The "[[ https://grafana.wikimedia.org/dashboard/db/mobile-2g?orgId=1&from=1501082591633&to=1503501791637 | CSS Size (Barack Obama - en.m) ]]" graph shows that the CSS size for this page has been fluctuating has been increasing and decreasing cyclically by a consistent amount of bytes. for at least 6 months now:
{F22252241}


The difference in CSS can be seen between the following two job runs on 28th and 29th:Compare:
http://wpt.wmftest.org/video/compareresult/180614_EZ_GR/1/details/#waterfall_view_step1 (makes [[ https://en.m.wikipedia.org/w/load.php?tests=170829_0W_FM,170828_01_P5debug=false&lang=en&modules=ext.cite.styles%7Cext.math.styles%7Cmediawiki.hlist%7Cmediawiki.ui.button%2Cicon%7Cskins.minerva.base.reset%2Cstyles%7Cskins.minerva.content.styles%7Cskins.minerva.icons.images%7Cskins.minerva.tablet.styles&_only_=styles&skin=minerva | ext.math.styles ]] request
The bytes for CSS are 9,699 in one but 9,864 in the otherwith http://wpt.wmftest.org/result/180612_QJ_GW/1/details/#waterfall_view_step1 (no math request)

The Barack Obama page does not have any Math equations.

I am concerned that user specific preferences are causing parser cache pollution and this problem may be a larger performance problem then we are aware of.


Digging deeper, if you compare the css:== Developer notes
http://wpt.wmftest.org/result/170829_0W_FM/1/details/#waterfall_view_step1Looking at the underlying code there is a troublesome note "This affects the page caching behavior."
* Downloads stylesheet with [[ https://en.m.wikipedia.org/w/load.php?debug=false&lang=en&modules=ext.cite.styles%7Cext.math.styles%7Cmediawiki.ui.button%2Cicon%7Cskins.minerva.base.reset%2Cstyles%7Cskins.minerva.content.styles%7Cskins.minerva.icons.images%7Cskins.minerva.print.styles%7Cskins.minerva.tablet.styles&_only_=styles&skin=minerva | ext.math.styles ]]https://github.com/wikimedia/mediawiki-extensions-Math/blob/df1689c7177d5b7ef946ae2ff525594bd377da3f/Math.hooks.php#L198

I see the page rendering hash is linked to the user option but not the current user:

http://wpt.wmftest.org/result/170828_01_P5/1/details/#waterfall_view_step1
* Downloads stylesheet [[ https://en.m.wikipedia.org/w/load.php?debug=false&lang=en&modules=ext.cite.styles%7Cmediawiki.ui.button%2Cicon%7Cskins.minerva.base.reset%2Cstyles%7Cskins.minerva.content.styles%7Cskins.minerva.icons.images%7Cskins.minerva.print.styles%7Cskins.minerva.tablet.styles&_only_=styles&skin=minerva
s://github.com/wikimedia/mediawiki-extensions-Math/blob/df1689c7177d5b7ef946ae2ff525594bd377da3f/Math.hooks.php#L121

Given the regularity of the CSS change, it seems this isn't related to edit activity so I would suspect there is something funky with the caching here and the style is being added where it shouldn't be.

The style should only be added if the **chem** or **math** parser function is used. The only other place ext.math.styles is added relates to Wikidata: [[ https://github.com/wikimedia/mediawiki-extensions-Math/blob/670f0bb8f95b8d9ac7994ab3ff45a7bb8e91d185/src/MathWikidataHook.php#L45 | Wikidata hook]]
| without ext.math.styles ]]

TASK DETAIL
https://phabricator.wikimedia.org/T173949

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Jdlrobson
Cc: Peter, Jdlrobson, Volker_E, Aklapper, Imarlier, Lahi, Gq86, Darkminds3113, GoranSMilovanovic, Maosef, QZanden, LawExplorer, Winter, Vali.matei, JJMC89, Debenben, Bianjiang, Nirmos, Cwek, Wikidata-bugs, aude, fredw, GWicke, Physikerwelt, Pkra, Dinoguy1000, ssastry, scfc, Arlolra, Jackmcbarn, Mbch331, Jay8g
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to