Last modified: 2014-03-13 19:34:12 UTC
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).
Note: Iacd00a3aa implements something similar for bug 54215. The solutions of these two issues should be unified.
bug 37501?
Change 89792 had a related patch set uploaded by Tobias Gritschacher: Store EntityView js config in parser output https://gerrit.wikimedia.org/r/89792
(In reply to comment #2) > bug 37501? Related, but not required. Bug 37501 asks for addJsConfigVars to be added to ParserOutput, analogous to OutputPage::addJsConfigVars. This would allow us to add the JS vars directly to the ParserOutput, from where they owuld get automatically transferred into the OutputPage. We can however get the same effect by registering the desired information using ParserOutput::setExtensionData and then transferring it into the OutputPage later, using the OutputPageParserOutput hook, as done by the patch provided.
ParserOutput::addJsConfigVars was added with Gerrit change #108333
*** This bug has been marked as a duplicate of bug 54215 ***
Change 89792 merged by jenkins-bot: Store EntityView js config in parser output https://gerrit.wikimedia.org/r/89792