Page MenuHomePhabricator

Use ResourceLoader for message delivery
Closed, ResolvedPublic

Description

Currently, English messages in alpha are ~3.5kb, and this number can be several times greater for other languages. We need to use RL to avoid loading them on every page view.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=25349

Details

Reference
bz43409

Event Timeline

bzimport raised the priority of this task from to Low.
bzimport set Reference to bz43409.
MaxSem created this task.Dec 25 2012, 4:39 PM

Note reviewing all the existing messages the only ones that will not be loaded on every page load are:

			'mobile-frontend-watchlist-add',
			'mobile-frontend-watchlist-removed',
			'mobile-frontend-watchlist-view',

The messages still need to be loaded on every page load so RL will not reduce this by much.

The only really noticeable benefit here is modules laid out much clearer!

The whole point of RL is that messages are cached client-side as they're delivered via a separate load.php request.

True there is also that - but that could be achieved without RL.

RL is currently only in beta so bumping to beta component.

Several messages remain due to a lack of the parse function in non-beta - these currently get parsed on the server and should be reviewed.

The following messages also seem to get swallowed on beta..
bad key given: mobile-frontend-show-button load.php:71
bad key given: mobile-frontend-hide-button load.php:71
bad key given: mobile-frontend-search-help load.php:71

https://gerrit.wikimedia.org/r/46622 fixes the missing messages.. now just need to fix the ones that require parsing..

https://gerrit.wikimedia.org/r/46885 takes care of the rest by allowing modules to specify messages that need parsing beforehand.