On Mon, Jul 15, 2013 at 7:57 PM, Ilya Grigorik igrigorik@google.com wrote:
+asher (woops, forgot to cc :))
On Mon, Jul 15, 2013 at 7:54 PM, Ilya Grigorik igrigorik@google.comwrote:
Anyway, I've already started working on something I noticed in mod_pagespeed - a much better JS minification, expect updates soon:)
Not to discourage you from doing so.. but JS minification is not the problem. In fact, if you look at the sidehttp://www.webpagetest.org/breakdown.php?test=130715_82_3c03a9eb9339dcf8d3e82ed43ad2998d&run=3&cached=0by sidehttp://www.webpagetest.org/breakdown.php?test=130715_VZ_7748042f6f940ec663a43130cd597eee&run=4&cached=0content breakdown of the original and MPS optimized sites, you'll notice that MPS is loading 3kb more of JS (because we add some of our own logic).
We're not talking about applying missing gzip or minification.. To make the site mobile friendly, we're talking about structural changes to the page: eliminating blocking javascript code, inlining critical CSS to unblock first render, deferring other assets to after the above-the-fold is loaded, and so on. Those are the parts that MPS automates - the filmstriphttp://www.webpagetest.org/video/compare.php?tests=130715_82_3c03a9eb9339dcf8d3e82ed43ad2998d-l%3Aoriginal-r%3A3%2C130715_VZ_7748042f6f940ec663a43130cd597eee-l%3Amps-r%3A4%2C%2C%2C%2C&thumbSize=100&ival=100&end=visualshould speak for itself. (Note that filmstrip shows first render at 2s, instead of 1.6, due how how the frames are captured on mobile devices in WPT).
These are the points I was trying to highlight from your presentation :) While there's room for further optimization after, inlining above the fold css and deferring everything else including additional content seem like immediate gains we could start working on. The mobile dev team has already put work into being able to serve above the fold plus section headers in an initial request - we just need to make some changes to how we assemble pages to support inlining required css/js for this view, and separating out the rest. I think this can and should be delivered by mediawiki / resourceloader / mobilefrontend by design, instead of via mps however.
As Max noted, this would require an additional varnish cache split, varying between devices that support this and those that don't. But the performance gain for supported devices should fully justify it, and we just invested in additional frontend cache capacity for mobile.
-Asher
wikitech-l@lists.wikimedia.org