Currently, ViewEntityAction::show will call EntityView::registerJsConfigVars on every page view, causing considerable database load. This is really redundant, since the information generated there is already known when generating the HTML.
It would be good to put the JS config data into the ParserOutput along with the HTML, and then just transfer it to the OutputPage object (probably using a hook).
Version: unspecified
Severity: major
Whiteboard: backlog u=dev c=backend p=0
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=54215