We’ve Shown We Care About Performance • Numerous DrupalCon sessions on performance. • Memcache, APC, Boost, and numerous other performance modules. • Drupal 7 works well with reverse proxys. • Lots of internal optimizations in Drupal. • I could go on and on.... but....
In the post-PC era our sites aren’t just competing with other sites. They’re competing and working with with native apps.
Others working on Front End Performance • Browser manufacturers working on JS, DNS prefetching, and many other techniques. • Mobile networks (4g improvements over 3g) • New Protocols (SPDY) • Linux Kernel TCP Slow-Start Changes
6 The number of parallel connections to a domain across all tabs and windows in desktop browsers.
512MB The amount of RAM in the iPhone 4s and iPad 2. Mobile devices typically have 1GB or less of RAM. This helps extend battery life.
Original 24% the Size Minified drupal.js
Others Minifying Their Production JS jQuery Dojo MooTools YUI SWFObject Ext jQuery UI Backbone Underscore Three.js Sharepoint Wordpress
Minify on the fly or ship with minified files? Answer: Ship with minifed files
jsmin-php v. UglifyJS • UglifyJS produces smaller files. drupal.js is 7% smaller. • jsmin-php no longer maintained. • UglifsJS no runtime cost. jsmin-php has runtime cost. drupal.js (.25s) and jquery.js (2.5s) are examples. • Some files (like jQuery ba-bbq) have a second license block half way through file. You can’t automate keeping these.
Add A Toggle To Performance Page This is a screenshot from jquery.com.
When Do We Update Minified Files? • When each full source JS file is changed? • At release time? A job of the person generating the release? • Automated via a script? We can work out the details in the issue queue.
Assetic Some Good • Can tie in with minification if available. • Can use for Image lossless compression when packages available. • Filters, extensions, etc. • Sass, Stylus, Less, CoffeeScript. Needs Works • No Aggregation. • Sass, Stylus, Less, CoffeeScript.
Part 4: Exclude CSS Files
“We tested our CSS and found 80% wasn’t being used.” * Terribly paraphrased from IRC