First impressions count! You can make the initial experience of loading VE substantially faster by prefetching the modules on a standard article page if the DOM isn't busy.
What I have in mind is something like this:
$( window ).load( function () {
if ( !mw.loader.store.enabled ) {
return;
}
setTimeout( function () {
var modules = [
'ext.visualEditor.base',
'ext.visualEditor.core'
'ext.visualEditor.data',
'ext.visualEditor.icons-vector',
'ext.visualEditor.mediawiki',
'ext.visualEditor.viewPageTarget',
'ext.visualEditor.viewPageTarget.icons-vector',
]
mw.loader.using( modules.filter( function ( module ) {
var key = mw.loader.store.getModuleKey( module );
return key in mw.loader.store.items;
} ) );
}, 0 );
} );You'd need to ensure that the modules don't execute automatically somehow.
Version: unspecified
Severity: enhancement