https://bugzilla.wikimedia.org/show_bug.cgi?id=57952
Web browser: ---
Bug ID: 57952
Summary: Prefetch VE modules
Product: VisualEditor
Version: unspecified
Hardware: All
OS: All
Status: NEW
Keywords: performance
Severity: normal
Priority: Unprioritized
Component: Initialisation
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l