Last modified: 2014-10-01 22:59:00 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 T73539, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71539 - Static data should go in ResourceLoaderGetConfigVars, not MakeGlobalVariablesScript
Static data should go in ResourceLoaderGetConfigVars, not MakeGlobalVariables...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Echo (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: performance
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-01 22:59 UTC by Matthew Flaschen
Modified: 2014-10-01 22:59 UTC (History)
5 users (show)

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


Attachments

Description Matthew Flaschen 2014-10-01 22:59:00 UTC
For performance reasons, static data should go in ResourceLoaderGetConfigVars, not MakeGlobalVariablesScript.

The key difference is that static data (ResourceLoaderGetConfigVars) goes in the startup module and is loaded once (until the startup module is re-generated/cache expires, then it needs to be downloaded again).

MakeGlobalVariablesScript data is in the source code of every page, so it should only be used when the data is request-specific.  Generally, this may be specific to the page, user/username, or other aspects of the request.

wgEchoOverlayConfiguration['max-notification-count'] is static (unlike notification-count), so it should ideally be broken into a separate static variable.

ResourceLoaderGetConfigVars and wgEchoConfig are also static.  However, there's a complication that wgEchoConfig is set differently when testing.  This exception should be dropped so it can be static, if possible.

The comments should also be updated so it's clear to people which one to use.

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


Navigation
Links