Last modified: 2014-11-17 09:21:14 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 T60082, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58082 - MwEmbedSupport injects too many JavaScript configuration variables
MwEmbedSupport injects too many JavaScript configuration variables
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
TimedMediaHandler (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Michael Dale
: performance
Depends on:
Blocks: 58083
  Show dependency treegraph
 
Reported: 2013-12-06 07:37 UTC by Ori Livneh
Modified: 2014-11-17 09:21 UTC (History)
9 users (show)

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


Attachments

Description Ori Livneh 2013-12-06 07:37:04 UTC
JavaScript configuration variables that are added via ResourceLoaderGetConfigVars are inserted into the start-up module, which is on the critical path to loading page content. MwEmbedSupport uses this interface to inject the contents of two configuration files, MediaWikiSupport.config.php & MwEmbedSupport.config.php, which contain largely static configuration data that is MwEmbedSupport-specific, the loading of which could be limited to pages containing timed media, and deferred until DOMContentLoaded or later.

If the configuration variables truly are static, they can be hard-coded in a JavaScript file and included in the scripts array of the the MwEmbedSupport ResourceLoader module. If it is important for these values to be configurable via PHP, a custom ResourceLoader module class should be written. For an example of this technique, refer to includes/ResourceLoaderULSJsonMessageModule.php in the UniversalLanguageSelector extension.
Comment 1 Michael Dale 2013-12-06 15:45:56 UTC
Makese sense. We should include this in player v2 inclusion / refactor efforts.

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


Navigation
Links