Last modified: 2014-03-13 19:34:12 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60340, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58340 - Cache JS config vars in parser output
Cache JS config vars in parser output
Status: RESOLVED DUPLICATE of bug 54215
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Wikidata bugs
backlog u=dev c=backend p=0
: performance
Depends on: 59820
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-11 18:39 UTC by Daniel Kinzler
Modified: 2014-03-13 19:34 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Kinzler 2013-12-11 18:39:53 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).
Comment 1 Daniel Kinzler 2013-12-11 18:42:04 UTC
Note: Iacd00a3aa implements something similar for bug 54215. The solutions of these two issues should be unified.
Comment 2 db [inactive,noenotif] 2013-12-14 13:32:13 UTC
bug 37501?
Comment 3 Gerrit Notification Bot 2014-01-07 09:10:41 UTC
Change 89792 had a related patch set uploaded by Tobias Gritschacher:
Store EntityView js config in parser output

https://gerrit.wikimedia.org/r/89792
Comment 4 Daniel Kinzler 2014-01-07 10:54:41 UTC
(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.
Comment 5 Umherirrender 2014-02-17 19:43:10 UTC
ParserOutput::addJsConfigVars was added with Gerrit change #108333
Comment 6 Lydia Pintscher 2014-03-04 14:43:05 UTC

*** This bug has been marked as a duplicate of bug 54215 ***
Comment 7 Gerrit Notification Bot 2014-03-13 19:34:12 UTC
Change 89792 merged by jenkins-bot:
Store EntityView js config in parser output

https://gerrit.wikimedia.org/r/89792

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links