Erik is surprised but Nemo_bis nicely summarized the issue: Commons is a multimedia repository; as opposed to Wikipedia or Wikivoyage. MediaWiki was developed mainly for creating an encyclopaedia. Some of the shortcomings are compensated using JavaScript at Commons. We do already use load on demand techniques for larger code files (RenameLink[17], RotateLink[1], UserMessages[18], WatchlistNotice[19]) and 93 of 97 or our gadgets[20] use RL (with its white-space compression).
Gadgets without RL usage: Gadget Reason --------------------------------------- popups|popups.js|navpop.css After switching to RL, popups "did not work" for a user. Perhaps just a caching issue... contribsrange|contribsrange.js No volunteer prepared it for RL yet. GalleryDetails|GalleryDetails.js No volunteer prepared it for RL yet. Flickrfixr [...]|Flickrfixr.js No volunteer prepared it for RL yet. Name Full size Without i18n Gadgets 2.0 would save up to ----------------------------------------------------------------------------- RotateLink[1] 2.900 Bytes 2.002 Bytes 898 Bytes (about 30%) MyUploads[4] 6.367 Bytes 1.105 Bytes 5262 Bytes (about 82%) WikiMiniAtlas[5] 23.901 Bytes 17.339 Bytes (*+compression, global gadget: 11.794 Bytes) 12.107 Bytes (about 51%) [[MediaWiki:Common.js]] The following RL-enhanced gadgets load uncompressed i18n-user-language-files (i.e. including whitespace and comments): * AjaxQuickDelete (provides the "nominate for deletion" link) * ExtraTabs2 * [[MediaWiki:Common.js]] Default gadgets that should not be implemented by community gadget but are due to missing Media-support in MediaWiki: * Stockphoto.js 19.526 Bytes[2] * RotateLink 2.900 Bytes [1] * Slideshow 12.645 Bytes[3] * HotCat 77.824 Bytes[6] * ImageAnnotator [7]130.798 Bytes + [10]74.933 Bytes + [11]49.152 Bytes + [12]17.398 Bytes + [13]4.731 Bytes + [14]14.950 Bytes + [15]7.099 Bytes = 299.061 Bytes Gadgets present for legacy support (could be replaced if someone would run a bot and some templates are changed): * CollapsibleTemplates 2.150 Bytes What could be optimised by the Community without changing any settings? * Make ImageAnnotator [7] and all its dependencies [10], [11], [12], [13], [14] a default gadget with compression by RL and load-on-demand technique. Still no proper support for Language-switching for anonymous users, hence * AjaxTranslation[8] 3.356 Bytes * Anonymousi18n[9] 21.492 Bytes are still required. Please do not forget to account TMH and its dependencies. Something is loading mediawiki.jqueryMsg and jquery.jStorage by default, even on the main page. Also note the all the fonts that are fetched, that makes >500 KB which is also a lot. All byte-values are calculated from UTF-8 (windows line ending, with BOM) without gzip compression. I did not analyse how many bytes we could save when not serving legacy code or code that does simply the same. But I guess it is enormous. That's why my appeal to the WMF is making more JS-core-features instead of waiting until all wikis and community JS-maintainers installed their own stuff. This was true, once for jQuery -- now we have stuff like LAPI ("Lupo's API")[10] or UIElements[13]; temporarily we had jStorage installed at Commons because Bug 35073[21] was "WONTFIX"ed and libAPI has been created because the core functionality is unable to deal with a lot of issues including connection loss (WiFi), logIn-loss or CAPTCHA-requests, for example. Repeating the same i18n and logic in all the modules using mw.Api is a waste of human resources. Best Rainer -------------------- just a commons user [1] http://bits.wikimedia.org/commons.wikimedia.org/load.php?modules=ext.gadget.RotateLink [2] http://bits.wikimedia.org/commons.wikimedia.org/load.php?modules=ext.gadget.Stockphoto [3] http://bits.wikimedia.org/commons.wikimedia.org/load.php?modules=ext.gadget.Slideshow [4] http://bits.wikimedia.org/commons.wikimedia.org/load.php?modules=ext.gadget.MyUploads [5] http://meta.wikimedia.org/w/index.php?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript [6] http://bits.wikimedia.org/commons.wikimedia.org/load.php?modules=ext.gadget.HotCat [7] http://commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-ImageAnnotator.js&action=raw&ctype=text/javascript [8] http://commons.wikimedia.org/w/index.php?title=MediaWiki:AjaxTranslation.js&action=raw&ctype=text/javascript [9] http://commons.wikimedia.org/w/index.php?title=MediaWiki:AnonymousI18N.js&action=raw&ctype=text/javascript [10] http://commons.wikimedia.org/w/index.php?title=MediaWiki:LAPI.js&action=raw&ctype=text/javascript [11] http://commons.wikimedia.org/w/index.php?title=MediaWiki:Tooltips.js&action=raw&ctype=text/javascript [12] http://commons.wikimedia.org/w/index.php?title=MediaWiki:TextCleaner.js&action=raw&ctype=text/javascript [13] http://commons.wikimedia.org/w/index.php?title=MediaWiki:UIElements.js&action=raw&ctype=text/javascript [14] http://commons.wikimedia.org/w/index.php?title=MediaWiki:ImageAnnotatorConfig.js&action=raw&ctype=text/javascript [15] http://commons.wikimedia.org/w/index.php?title=MediaWiki:AjaxSubmit.js&action=raw&ctype=text/javascript [16] http://www.mediawiki.org/wiki/Gadgets_2.0 [17] http://bits.wikimedia.org/commons.wikimedia.org/load.php?modules=ext.gadget.RenameLink [18] http://bits.wikimedia.org/commons.wikimedia.org/load.php?modules=ext.gadget.UserMessages [19] http://bits.wikimedia.org/commons.wikimedia.org/load.php?modules=ext.gadget.WatchlistNotice [20] http://commons.wikimedia.org/wiki/MediaWiki:Gadgets-definition [21] https://bugzilla.wikimedia.org/show_activity.cgi?id=35073 _______________________________________________ Commons-l mailing list Commons-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/commons-l