the sizes are unminified, ungzipped
Looking at the gzipped figures:
- this change would add 104.8kb of minified gzipped JS+CSS, loaded async in
the footer of pages that have thumbnails on them
- a page like Lightbox_demo loads 95.6kb of external JS+CSS currently
(there's a bunch of inline JS and CSS as well, though, which is hard to
measure)
You're right, I didn't realize how bloated Media Viewer was, which makes my
proposal a bad idea, since it would more than double the amount of JS+CSS
loaded on articles. Our dependencies seem to play a large part:
- jquery.color 0.5kb
- jquery.colorUtil 1.2kb
- jquery.fullscreen 0.7kb
- jquery.scrollTo 1.4kb
- jquery.tipsy 2.2kb
- mediawiki.Uri 1.4kb
- mediawiki.ui 0.8kb
- mediawiki.ui.button 1.1kb
- moment 11.5kb (!)
- oojs 2.4kb
- oojs-ui 40.1kb (!)
Totalling 63.3kb (60% of Media Viewer's weight)
This is yet another argument against OOjs UI, which has caused us so many
problems. But now isn't the time to back out of it, we have to stick with
it for the launch period. Moment is also questionable, considering how
little functionality it provides (couldn't it be replaced by more
server-side processing of dates?).
I guess an alternative is to start preloading Media Viewer's JS and CSS
when the mouse cursor gets near thumbnails. What do you think of that?
Doesn't solve the problem for touch screens, but the benefit for desktop
would be tangible.
On Wed, Apr 9, 2014 at 11:02 PM, Gergo Tisza <gtisza(a)wikimedia.org> wrote:
(Sorry for the threadbreak. I thought I would CC this
to wikitech-l since
it would affect site performance in general, so I added more context to the
subject, but then I didn't, and forgot to change it back.)
_______________________________________________
Multimedia mailing list
Multimedia(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/multimedia