SlideShare una empresa de Scribd logo
1 de 113
Descargar para leer sin conexión
The CBC on a Diet
Slimming down for a whole nation




                                   #SpotlightWPO
Barbara // bbinto             Blake // blakecrosby
Senior Architect, Mobile Web   Team Lead, Media Production Support
     Digital Operations, CBC   MO&T, CBC




                                                          #SpotlightWPO
Today’s workout
•   Quick dive into web performance
•   The CBC - weight problems and temptations
•   How to stay in shape
•   Real production exercises that worked for CBC
•   Our fitness tips summarized
•   Performance Quiz (if time permits)




                                                    #SpotlightWPO
Performance
Why the need for speed?




                          #SpotlightWPO
#SpotlightWPO
Perception of Speed
•   It feels slower when...
    • Unpleasant
    • Unknown
    • Boring

•   It feels faster when...
    • Task is successful
    • Responsive system
    • Progress and informed

                              #SpotlightWPO
“Ultimately performance is about respect”
Brad Frost




                                            #SpotlightWPO
Mobile & Performance
Why is performance for mobile so crucial?




                                            #SpotlightWPO
It’s a mobile (browser) world




                                #SpotlightWPO
Performance on Mobile

•   Battery-driven device, heavy pages will drain
    the battery (excellent paper)
•   Smaller CPU
•   Network connectivity / latency
•   Data usage - Don't make the user pay for
    bad performance

                                            #SpotlightWPO
You’re dealing with impatient users

74% of mobile web users expect a page to load
in 5 seconds or less
Gomez - What Mobile Users Want




                                           #SpotlightWPO
Measure performance




                      #SpotlightWPO
Tools, Formats and Browser Plugins

•    Browser plugins
    • “Waterfall” inside Firebug, Chrome etc
    • PageSpeed, YSlow and YSlow Plugin for 3rd party


•    HAR (ultrasound of a web page)
    • Based on the HTTP Archive specification
    • Captures web page loading information
      in a JSON format
    • Visualizing: HAR Viewer

                                                        #SpotlightWPO
Collecting measurements




                          #SpotlightWPO
Synthetic Testing and Real User Monitoring (RUM)
Hand in hand




                                                   #SpotlightWPO
Synthetic Testing
•   You run the test
•   Establish a baseline performance level
    (e.g identify poor 3rd party scripts)
•   Measuring one exact configuration (of your
    choice)
•   Pitfalls
    • “[...] your real users are experiencing page load times that are
      twice as long as their corresponding synthetic
      measurements.” (Steve Souders)
                                                                 #SpotlightWPO
Synthetic Testing - Tools
•   PageSpeed
    • Insights API

      curl "https://www.googleapis.com/pagespeedonline/v1/runPagespeed?url=http://sample.com&key=yourAPIKey"




•   Webpagetest.org
    • Public and private instances with RESTful API
      http://www.webpagetest.org/runtest.php?url=example.com&runs=3&k=apikey&f=json




•   Headless Scripts and Tools
    • phantomJS, confess, or write your own script
                                                                                                  #SpotlightWPO
Real User Monitoring (RUM)

•   User runs the test
•   Measures the experience of the “actual” user
    • “It is the ground truth for what users are experiencing” (Steve
      Souders)

•   Get concrete information about user’s
    connectivity, latency, bandwidth etc.


                                                                #SpotlightWPO
RUM
•   Based on navigation timing
                      !"#$%&'()&*+,$-(.(,)$
•   Free Tools
     • Boomerang
     • Google Analytics

•   Vendors
    • Keynote
    • New Relic
    • and more...
                          /0123344454"5+6)3-73,&'()&*+,8*.(,)3$#SpotlightWPO
Canadian crown corporation

       Desktop site page views ~5Mio/day


                               Mobile Touch site page views ~ 500K/day



     Canadian Broadcasting Corporation
                                  National public radio and television broadcaster

Kind of like the BBC
                  but not really - the CBC employs commercial advertising to supplement
                  its federal funding




                                                                              #SpotlightWPO
Mandate: The 1991 Broadcasting Acts states
that...
"...the Canadian Broadcasting Corporation, as the national public broadcaster, should
provide radio and television services incorporating a wide range of programming that
informs, enlightens and entertains;

...the programming provided by the Corporation should:
vi. be made available throughout Canada by the most appropriate and
efficient means and as resources become available for the purpose, and
vii. reflect the multicultural and multiracial nature of Canada.”




                                                                               #SpotlightWPO
Organizational Structure - Clients




                                #SpotlightWPO
CBC’s digital ecosystem




                          #SpotlightWPO
What constitutes a web product at CBC?




                                         #SpotlightWPO
Anatomy of a CBC page

•   3rd party scripts
    • Tracking (SiteCatalyst, ComScore, ClickTale)
    • Ads (GPT)
    • Social plugins (Gigya)

•   Content
    • Global header and footer (for branding)
    • Actual content to tell a story, e.g. Text, Video, Audio, Images etc.


                                                                 #SpotlightWPO
Weight Check: Desktop and Mobile




                                   #SpotlightWPO
A typical CBC story page




                           #SpotlightWPO
Let’s put them on a scale!
Content Breakdown




                             #SpotlightWPO
Content Breakdown - Mobile




                             #SpotlightWPO
Content Breakdown - Mobile


          Fully loaded
           247kB
         HTTP requests
              36


                             #SpotlightWPO
Content Breakdown - Desktop




                              #SpotlightWPO
Content Breakdown - Desktop




                              #SpotlightWPO
Content Breakdown - Desktop


          Fully loaded
          1,539kB
         HTTP requests
             164


                              #SpotlightWPO
Too heavy? Compared to what though...?




                                         #SpotlightWPO
httparchive.org
The HTTP Archive tracks how the web is built




                                               #SpotlightWPO
Desktop - Total Transfer Size

 November 2010 - March 2013: + ~50%


                                  1211kB

                                  90 req.




                                  #SpotlightWPO
Mobile - Total Transfer Size

 June 2011 - March 2013: + ~50%

                                  720kB




                                  60 req.




                                  #SpotlightWPO
The average page will hit 2MB by 2015
Images and 3rd party scripts are the main culprits




                                                     #SpotlightWPO
Avoid Dangerous Temptations




                              #SpotlightWPO
Temptations
•   That’s a lot of cookies




                Yikes!




                              Oh No!
Temptations

 Tipping the scale




                     #SpotlightWPO
Cookies on a Diet

•   Use the path option to limit cookie scope
•   Store your static assets at a different
    domain (images.cbc.ca)
•   Don’t use cookies for fun. Ask: Do you really
    need them?


                                              #SpotlightWPO
Common temptations of a front-end dev




                                        #SpotlightWPO
Temptations
                      Let’s use those
Yeah yeah,            2MB retina                     I want to
I’ll optimize         images for                     use that
later                 every                          cool new
                      platform                       plugin I just
                                                     found



         Sure, I’ll add                 Wait....I just want to
         that new                       make it pretty (and
         social media                   prettier)
         plugin




                                                             #SpotlightWPO
3rd Party Monsters




                     #SpotlightWPO
Monsters?
•   Kinds of monsters
    • Ads, tracking, social buttons

•   They are unpredictable, scary, disruptive,
    sneaky and
    • Could slow down your site
    • Could bring down your site (Single Point of Failure)
    • Could do things you don’t want them to do
    • Add weight and complexity to your page

                                                             #SpotlightWPO
What would a life without ads feel like....????




                                                  #SpotlightWPO
The wonderful life without ads....




                                #SpotlightWPO
CBC without mobile touch ads....


•   Using server-side ads code over client-side
    code saved us ~20% of load time
•   Using no ads in comparison to client-side
    ads reduced our load time by ~40%



                                           #SpotlightWPO
And the danger with all diets ....




                                     #SpotlightWPO
Yo-yo effect

•   Keep the excitement and
    awareness
•   Be diligent and stay focused
•   Don’t gain the weight
    back


                                   #SpotlightWPO
Monitor your fitness level
So you can identify your problem areas




                                         #SpotlightWPO
Monitoring your fitness level

 Alerts




                               #SpotlightWPO
Monitoring your fitness level

 Automated Reports




                               #SpotlightWPO
Monitor and test your speed (Mobile)

•   Device testing and speed simulation
    • Adobe Edge
    • shim (Boston Globe)
    • Slowy

•   Remote debugging
    • Weinre / debug.phonegap.com
    • Bookmarklets (Firebug Lite, YSlow)
    • Safari Remote Web Inspector
                                           #SpotlightWPO
Monitor and average the Unpredictable

 Typical (breaking) news traffic
  •   Difficult to measure average, visitors
Create your own performance dashboard




                                        #SpotlightWPO
Create your own perf dashboard

•   Run WebPageTest on your own server and
    export HAR files
•   Automate your test runs
•   Use js tools to visualize (Google chart tools,
    d3.js)


                                              #SpotlightWPO
Create your own perf dashboard


•   JavaScript based tools
    • PhantomJS: headless webkit with JavaScript API
    • CasperJS: navigation scripting and testing utility for PhantomJS
    • boomerang.js (JavaScript library for RUM): measures the page
      load time experienced by real users




                                                               #SpotlightWPO
Stay in shape




                #SpotlightWPO
#SpotlightWPO
Front-End

•   Google
    • https://developers.google.com/speed/docs/best-practices/
      rules_intro

•   Yahoo
    • http://developer.yahoo.com/performance/rules.html




                                                           #SpotlightWPO
Front-End

•   Conditional loading
•   Be careful on the 3rd party scripts (SPOF)
•   Avoid re-rendering DOM elements
•   Use data:uri
    • Encoded in base 64 format
    • For example, can be used to replace background images < 2kB



                                                          #SpotlightWPO
data:uri

•   Task: CBC Gem
•   Performance test                             30px


    • no background image, pure CSS
    • png background image inside CSS     30px

    • data:uri (encoded png as base 64)
      inside CSS

•   Conditions
    • all minified, concatenated, compressed
                                                        #SpotlightWPO
data:uri - pure CSS




                      #SpotlightWPO
data:uri - png bg img in CSS




                               #SpotlightWPO
data:uri in CSS




                  #SpotlightWPO
Performance comparison

                 pure CSS   PNG in CSS   data:uri in CSS


 HTTP requests      2           3              2

  Bytes in kB      4.1         2.9            3.3

  Load Time
                  0.303s      0.389           0.26
   (Median)




                                                     #SpotlightWPO
Server and Back-End
•   Last mile acceleration (use
    GZip compression)
•   Take advantage of a CDN,
    if possible
•   Only use cookies where
    necessary
•   Caches are your friend

                                  #SpotlightWPO
Dedicated mobile sites




                         #SpotlightWPO
Server-side Optimization & Device
Detection

•   Decide on the server what to serve
    • Different websites (Text, Rich, Touch) for optimized experience
    • Optimized and different images for all of our 3 mobile sites

•   Edge side include technology (ESI) for device
    detection and/or conditional loading



                                                                     #SpotlightWPO
Responsive Web Design and Web Performance
“72% of the sites using responsive design don't optimize for mobile” (Guy Podjarny)
(86% in 2012)




                                                                                #SpotlightWPO
How about RESS?


•   Responsive Web Design with Server Side
    Components
•   Heavy resource lifting should be done on the
    server



                                           #SpotlightWPO
Second Screen Example - RESS




Touch Mobile                                 Tablet                            Desktop
low-res images and mobile ads   retina high-res images and mobile ads   high-res images and fullsite ads

                                                                                             #SpotlightWPO
RESS - Server Side Component




                           #SpotlightWPO
RESS - RWD component




                       #SpotlightWPO
Exercises that worked for CBC




                                #SpotlightWPO
The Power of 304


•   Very important to support If-Modified-Since
    requests
•   Allows caches to properly cache content.
    Don’t cache bust!



                                           #SpotlightWPO
The Proof
            28kb




                   12kb




                          #SpotlightWPO
Before.... After
Keep those 404s in check

•   Heavy 404 Page?
•   Browser will download
    the 404 page even if it’s
    for a broken image or
    other asset



                                #SpotlightWPO
Definitely not super-model thin...
The Difference...



•   5.2kB versus 1.4kB
•   Savings of ~75%




                         #SpotlightWPO
Global Shell

•    Shared by all
•    Visual representation
•    Non-visual representation
    • SSI variables in header to serve ads and tracking

    • Global scripts and stylesheets

    • SiteCatalyst and ComScore




                                                          #SpotlightWPO
Improvement is easier than you think




                                       #SpotlightWPO
How did we improve? Simple!


•   Re-factored code: Removed old/un-used
    code
•   Moved some scripts to the bottom of page
•   Minified and concatenated scripts and CSS
    files to reduce file size and HTTP requests


                                         #SpotlightWPO
How did we improve?


•   Why optimizing manually if you can just
    automate it
•   Included performance optimization into your
    deploy and release process



                                              #SpotlightWPO
Automated & Built-in Performance Tips


•   Maven, Ant Tools and Plugins
    • Closure Compiler (Google)
    • Minify-maven-plugin
    • HTMLCompressor
    • Confess
    • cssembed.jar for data:uri




                                        #SpotlightWPO
Automated & Built-in Performance Tips



•   If you can’t / don’t want to use Maven / Ant
    • Taskrunners and Scaffolding: Grunt, Yeoman

•   Continuous integration
    • Jenkins and Hudson




                                                   #SpotlightWPO
What were the results?




                         #SpotlightWPO
Global Shell




               #SpotlightWPO
Global Shell

   Area                          Before           After    Improvement (in %)


  HTTP
                                     24            18             25
 Requests


Page Weight                      71.9kB           69.8kB           3



 Page Load*                        3.16s          1.91s           40



   *Page load depends on connection and latency                        #SpotlightWPO
If you don’t monitor your weight, you can also
make it worse...
...and you’ll get unexpected visitors again ..yo-yo effect




                                                             #SpotlightWPO
#SpotlightWPO
3rd Party Monsters interrupt
            (("




            ()"
                                                                                                                         ISP issues                              Client-side scripts

             '"




             &"
 !"#$%&'(




             %"




             $"




             #"
                                                                           Global Shell


             !"
             $*+(*(+" $*+&*(+"   %*#*(+"   %*(+*(+" %*('*(+" %*+$*(+"   &*+*(+"   &*'*(+"   &*($*(+" &*+,*(+" &*,)*(+"   '*$*(+"   '*(,*(+" '*+)*(+" '*+%*(+" ()*!*(+" ()*((*(+" ()*(&*(+"



                                                                             Data from Keynote
                                                                                                                                                                                    #SpotlightWPO
A user who has to endure an 8-second
download delay spends only 1% of
their total viewing time looking at the featured
promotional space on a landing page.
In contrast, a user who receives
instantaneous page rendering spends
20% of viewing time within the
promotional area (source: Nielsen)

                                             #SpotlightWPO
CBC’s fitness tips - Take aways




                                 #SpotlightWPO
Share your results




   Fitness Tip       #SpotlightWPO
“It’s not about what you can add, it’s about what
you can’t take away”
(Christian Heilmann, The Vanilla Web Diet)




      Fitness Tip                              #SpotlightWPO
You can never measure and test enough
Run tests frequently




      Fitness Tip                       #SpotlightWPO
Show graphs and complexity to illustrate
performance success and also bad hits
A picture is worth a thousand words




     Fitness Tip                           #SpotlightWPO
Make it fun and painless, make it part of your daily
routine
Automated Performance within your organization




     Fitness Tip                                 #SpotlightWPO
Watch those 3rd party monsters
Evaluate their impact, ask and push for server-side solutions




      Fitness Tip                                               #SpotlightWPO
Serve only what the client needs
Device Detection, Server-side components and Responsive Web Design




     Fitness Tip                                                     #SpotlightWPO
Share your ideas and knowledge
Web Performance Working Group




     Fitness Tip                 #SpotlightWPO
Create a culture of performance
Bring everyone on board




     Fitness Tip                  #SpotlightWPO
Set a Performance Budget




   Fitness Tip             #SpotlightWPO
Performance Budget


•   Be diligent and cautious about new features
•   Set a baseline / weight (e.g. BBC 10 seconds on 3G/GPS)
•   Evaluate a good conversion rate, cost vs. revenue
•   Visit HTTP Archive for comparison
•   Always evaluate what you can take away (content breakdown)




                                                        #SpotlightWPO
Samples of Performance Budget


•   Set a budget for 3rd party scripts
    • “Should not weigh more than ...”

•   Evaluate the need for frameworks
•   Run quick performance tests on mocks



                                         #SpotlightWPO
Questions?
#SpotlightWPO
  /blakecrosby
  /bbinto



We’re hiring!

    Thank you!   #SpotlightWPO
Photo Credits
•http://beautygirlsmom.com/wp-content/uploads/2011/01/diet-funny-sign-spelled-out-vegetable.jpg
•http://photobucket.com/images/yo+yo+puppy+dog+yoyo+animated+gif+funny/
•http://www.wallpaper-welt.de/gros/film/monster-ag/Monster%20AG.jpg
•http://www.passiveaggressivenotes.com/2007/07/29/this-is-why-your-server-is-cranky/
•http://4.bp.blogspot.com/-NnFPM5Fgbao/TaIkVwyusEI/AAAAAAAAMPw/fdDbbvgJRb8/s1600/054.jpg
•http://thefulltimedomesticgoddess.com/wp-content/uploads/2011/09/girls-holding-hands-bw.jpg
•http://cartoonswalls.com/walls/monsters_university_desktop_wallpaper-wide.jpg
•http://41inmylife.files.wordpress.com/2011/06/weight_scale.jpg
•http://blogs.scientificamerican.com/the-curious-wavefunction/files/2012/08/boeing_777_cockpit.jpg




Sources
•http://www.slideshare.net/stoyan/psychology-of-performance
•http://www.stevesouders.com/blog/2012/11/14/comparing-rum-synthetic-page-load-times/
•http://bradfrostweb.com/blog/post/performance-as-design/
•“Who killed my battery: Analyzing Mobile Browser Consumption” http://www2012.wwwconference.org/proceedings/proceedings/p41.pdf
•http://www.slideshare.net/guypod/performance-implications-of-mobile-design
•http://www.cbc.ca/m/touch/sports/story/2013/03/05/sp-paralympics-oscar-pistorius.html
•Desktop: http://www.webpagetest.org/result/130315_TQ_WT1/
•Mobile:http://www.webpagetest.org/result/130315_1X_X18/
•http://coding.smashingmagazine.com/2012/11/13/the-vanilla-web-diet/
•http://www.gomez.com/wp-content/downloads/19986_WhatMobileUsersWant_Wp.pdf




                                                                                                                            #SpotlightWPO

Más contenido relacionado

Similar a The CBC on a diet - Slimming down for a whole nation

Stapling and patching the web of now - ForwardJS3, San Francisco
Stapling and patching the web of now - ForwardJS3, San FranciscoStapling and patching the web of now - ForwardJS3, San Francisco
Stapling and patching the web of now - ForwardJS3, San FranciscoChristian Heilmann
 
Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)
Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)
Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)kevinjohngallagher
 
Pubcon florida 2018 logs dont lie dawn anderson
Pubcon florida 2018 logs dont lie dawn andersonPubcon florida 2018 logs dont lie dawn anderson
Pubcon florida 2018 logs dont lie dawn andersonDawn Anderson MSc DigM
 
The Future Of SEO/Content Marketing
The Future Of SEO/Content MarketingThe Future Of SEO/Content Marketing
The Future Of SEO/Content MarketingBritney Muller
 
How HTML5 missed its graduation - #TrondheimDC
How HTML5 missed its graduation - #TrondheimDCHow HTML5 missed its graduation - #TrondheimDC
How HTML5 missed its graduation - #TrondheimDCChristian Heilmann
 
Programming for Non-Programmers - SXSW Vegas 2014
Programming for Non-Programmers - SXSW Vegas 2014Programming for Non-Programmers - SXSW Vegas 2014
Programming for Non-Programmers - SXSW Vegas 2014Chris Castiglione
 
How pair programming can strengthen teams
How pair programming can strengthen teamsHow pair programming can strengthen teams
How pair programming can strengthen teamsHugo Messer
 
Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date. Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date. Christian Heilmann
 
Search Engine Optimize for WordPress in 3 Easy Steps
Search Engine Optimize for WordPress in 3 Easy StepsSearch Engine Optimize for WordPress in 3 Easy Steps
Search Engine Optimize for WordPress in 3 Easy StepsAnna Belle Leiserson
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteChristian Heilmann
 
Build your own analytics power tools
Build your own analytics power toolsBuild your own analytics power tools
Build your own analytics power toolsAlban Gérôme
 
夜宴24期《这段时间》
夜宴24期《这段时间》夜宴24期《这段时间》
夜宴24期《这段时间》Koubei Banquet
 
Progressive Web App Challenges
Progressive Web App ChallengesProgressive Web App Challenges
Progressive Web App ChallengesJason Grigsby
 
How to Implement Digital Marketing in 2017
How to Implement Digital Marketing in 2017 How to Implement Digital Marketing in 2017
How to Implement Digital Marketing in 2017 Online Business Owners
 
Technical SEO Myths Facts And Theories On Crawl Budget And The Importance Of ...
Technical SEO Myths Facts And Theories On Crawl Budget And The Importance Of ...Technical SEO Myths Facts And Theories On Crawl Budget And The Importance Of ...
Technical SEO Myths Facts And Theories On Crawl Budget And The Importance Of ...Dawn Anderson MSc DigM
 
BD Conf: Visit speed - Page speed is only the beginning
BD Conf: Visit speed - Page speed is only the beginningBD Conf: Visit speed - Page speed is only the beginning
BD Conf: Visit speed - Page speed is only the beginningPeter McLachlan
 
Notes From Velocity Conference Europe
Notes From Velocity Conference EuropeNotes From Velocity Conference Europe
Notes From Velocity Conference EuropeSiriusWay
 
DaZhangJM0203JM0203
DaZhangJM0203JM0203DaZhangJM0203JM0203
DaZhangJM0203JM0203Da Zhang
 
How Appboy’s Marketing Automation for Apps Platform Grew 40x on the ObjectRoc...
How Appboy’s Marketing Automation for Apps Platform Grew 40x on the ObjectRoc...How Appboy’s Marketing Automation for Apps Platform Grew 40x on the ObjectRoc...
How Appboy’s Marketing Automation for Apps Platform Grew 40x on the ObjectRoc...MongoDB
 

Similar a The CBC on a diet - Slimming down for a whole nation (20)

Stapling and patching the web of now - ForwardJS3, San Francisco
Stapling and patching the web of now - ForwardJS3, San FranciscoStapling and patching the web of now - ForwardJS3, San Francisco
Stapling and patching the web of now - ForwardJS3, San Francisco
 
Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)
Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)
Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)
 
Pubcon florida 2018 logs dont lie dawn anderson
Pubcon florida 2018 logs dont lie dawn andersonPubcon florida 2018 logs dont lie dawn anderson
Pubcon florida 2018 logs dont lie dawn anderson
 
The Future Of SEO/Content Marketing
The Future Of SEO/Content MarketingThe Future Of SEO/Content Marketing
The Future Of SEO/Content Marketing
 
How HTML5 missed its graduation - #TrondheimDC
How HTML5 missed its graduation - #TrondheimDCHow HTML5 missed its graduation - #TrondheimDC
How HTML5 missed its graduation - #TrondheimDC
 
Programming for Non-Programmers - SXSW Vegas 2014
Programming for Non-Programmers - SXSW Vegas 2014Programming for Non-Programmers - SXSW Vegas 2014
Programming for Non-Programmers - SXSW Vegas 2014
 
How pair programming can strengthen teams
How pair programming can strengthen teamsHow pair programming can strengthen teams
How pair programming can strengthen teams
 
Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date. Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date.
 
Search Engine Optimize for WordPress in 3 Easy Steps
Search Engine Optimize for WordPress in 3 Easy StepsSearch Engine Optimize for WordPress in 3 Easy Steps
Search Engine Optimize for WordPress in 3 Easy Steps
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynote
 
Build your own analytics power tools
Build your own analytics power toolsBuild your own analytics power tools
Build your own analytics power tools
 
夜宴24期《这段时间》
夜宴24期《这段时间》夜宴24期《这段时间》
夜宴24期《这段时间》
 
Progressive Web App Challenges
Progressive Web App ChallengesProgressive Web App Challenges
Progressive Web App Challenges
 
How to Implement Digital Marketing in 2017
How to Implement Digital Marketing in 2017 How to Implement Digital Marketing in 2017
How to Implement Digital Marketing in 2017
 
Technical SEO Myths Facts And Theories On Crawl Budget And The Importance Of ...
Technical SEO Myths Facts And Theories On Crawl Budget And The Importance Of ...Technical SEO Myths Facts And Theories On Crawl Budget And The Importance Of ...
Technical SEO Myths Facts And Theories On Crawl Budget And The Importance Of ...
 
BD Conf: Visit speed - Page speed is only the beginning
BD Conf: Visit speed - Page speed is only the beginningBD Conf: Visit speed - Page speed is only the beginning
BD Conf: Visit speed - Page speed is only the beginning
 
Notes From Velocity Conference Europe
Notes From Velocity Conference EuropeNotes From Velocity Conference Europe
Notes From Velocity Conference Europe
 
DjangoSki
DjangoSkiDjangoSki
DjangoSki
 
DaZhangJM0203JM0203
DaZhangJM0203JM0203DaZhangJM0203JM0203
DaZhangJM0203JM0203
 
How Appboy’s Marketing Automation for Apps Platform Grew 40x on the ObjectRoc...
How Appboy’s Marketing Automation for Apps Platform Grew 40x on the ObjectRoc...How Appboy’s Marketing Automation for Apps Platform Grew 40x on the ObjectRoc...
How Appboy’s Marketing Automation for Apps Platform Grew 40x on the ObjectRoc...
 

Más de Barbara Bermes

Cheat Sheet to a Lean Website
Cheat Sheet to a Lean WebsiteCheat Sheet to a Lean Website
Cheat Sheet to a Lean WebsiteBarbara Bermes
 
3rd Party Footprint @ Webrebels
3rd Party Footprint @ Webrebels3rd Party Footprint @ Webrebels
3rd Party Footprint @ WebrebelsBarbara Bermes
 
Third Party Footprint: Evaluating the Performance of External Scripts
Third Party Footprint: Evaluating the Performance of External ScriptsThird Party Footprint: Evaluating the Performance of External Scripts
Third Party Footprint: Evaluating the Performance of External ScriptsBarbara Bermes
 
3rd party footprint - A PUBLISHER'S TAKE ON CONTROLLING 3RD PARTY SCRIPTS
3rd party footprint - A PUBLISHER'S TAKE ON CONTROLLING 3RD PARTY SCRIPTS3rd party footprint - A PUBLISHER'S TAKE ON CONTROLLING 3RD PARTY SCRIPTS
3rd party footprint - A PUBLISHER'S TAKE ON CONTROLLING 3RD PARTY SCRIPTSBarbara Bermes
 
WebExpo Talk: EMBRACING PERFORMANCE IN TODAY’S MULTI-PLATFORM MACROCOSM
WebExpo Talk: EMBRACING PERFORMANCE IN TODAY’S MULTI-PLATFORM MACROCOSMWebExpo Talk: EMBRACING PERFORMANCE IN TODAY’S MULTI-PLATFORM MACROCOSM
WebExpo Talk: EMBRACING PERFORMANCE IN TODAY’S MULTI-PLATFORM MACROCOSMBarbara Bermes
 
Smartphones in Today's World
Smartphones in Today's WorldSmartphones in Today's World
Smartphones in Today's WorldBarbara Bermes
 
Building Energy-Efficient Websites
Building Energy-Efficient WebsitesBuilding Energy-Efficient Websites
Building Energy-Efficient WebsitesBarbara Bermes
 
Developing for Mobile Web
Developing for Mobile WebDeveloping for Mobile Web
Developing for Mobile WebBarbara Bermes
 
Business Analysis - Essentials
Business Analysis - EssentialsBusiness Analysis - Essentials
Business Analysis - EssentialsBarbara Bermes
 
Mobile Web Performance - Velocity 2011
Mobile Web Performance - Velocity 2011Mobile Web Performance - Velocity 2011
Mobile Web Performance - Velocity 2011Barbara Bermes
 

Más de Barbara Bermes (10)

Cheat Sheet to a Lean Website
Cheat Sheet to a Lean WebsiteCheat Sheet to a Lean Website
Cheat Sheet to a Lean Website
 
3rd Party Footprint @ Webrebels
3rd Party Footprint @ Webrebels3rd Party Footprint @ Webrebels
3rd Party Footprint @ Webrebels
 
Third Party Footprint: Evaluating the Performance of External Scripts
Third Party Footprint: Evaluating the Performance of External ScriptsThird Party Footprint: Evaluating the Performance of External Scripts
Third Party Footprint: Evaluating the Performance of External Scripts
 
3rd party footprint - A PUBLISHER'S TAKE ON CONTROLLING 3RD PARTY SCRIPTS
3rd party footprint - A PUBLISHER'S TAKE ON CONTROLLING 3RD PARTY SCRIPTS3rd party footprint - A PUBLISHER'S TAKE ON CONTROLLING 3RD PARTY SCRIPTS
3rd party footprint - A PUBLISHER'S TAKE ON CONTROLLING 3RD PARTY SCRIPTS
 
WebExpo Talk: EMBRACING PERFORMANCE IN TODAY’S MULTI-PLATFORM MACROCOSM
WebExpo Talk: EMBRACING PERFORMANCE IN TODAY’S MULTI-PLATFORM MACROCOSMWebExpo Talk: EMBRACING PERFORMANCE IN TODAY’S MULTI-PLATFORM MACROCOSM
WebExpo Talk: EMBRACING PERFORMANCE IN TODAY’S MULTI-PLATFORM MACROCOSM
 
Smartphones in Today's World
Smartphones in Today's WorldSmartphones in Today's World
Smartphones in Today's World
 
Building Energy-Efficient Websites
Building Energy-Efficient WebsitesBuilding Energy-Efficient Websites
Building Energy-Efficient Websites
 
Developing for Mobile Web
Developing for Mobile WebDeveloping for Mobile Web
Developing for Mobile Web
 
Business Analysis - Essentials
Business Analysis - EssentialsBusiness Analysis - Essentials
Business Analysis - Essentials
 
Mobile Web Performance - Velocity 2011
Mobile Web Performance - Velocity 2011Mobile Web Performance - Velocity 2011
Mobile Web Performance - Velocity 2011
 

Último

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Último (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

The CBC on a diet - Slimming down for a whole nation

  • 1. The CBC on a Diet Slimming down for a whole nation #SpotlightWPO
  • 2. Barbara // bbinto Blake // blakecrosby Senior Architect, Mobile Web Team Lead, Media Production Support Digital Operations, CBC MO&T, CBC #SpotlightWPO
  • 3. Today’s workout • Quick dive into web performance • The CBC - weight problems and temptations • How to stay in shape • Real production exercises that worked for CBC • Our fitness tips summarized • Performance Quiz (if time permits) #SpotlightWPO
  • 4. Performance Why the need for speed? #SpotlightWPO
  • 6. Perception of Speed • It feels slower when... • Unpleasant • Unknown • Boring • It feels faster when... • Task is successful • Responsive system • Progress and informed #SpotlightWPO
  • 7. “Ultimately performance is about respect” Brad Frost #SpotlightWPO
  • 8. Mobile & Performance Why is performance for mobile so crucial? #SpotlightWPO
  • 9. It’s a mobile (browser) world #SpotlightWPO
  • 10. Performance on Mobile • Battery-driven device, heavy pages will drain the battery (excellent paper) • Smaller CPU • Network connectivity / latency • Data usage - Don't make the user pay for bad performance #SpotlightWPO
  • 11. You’re dealing with impatient users 74% of mobile web users expect a page to load in 5 seconds or less Gomez - What Mobile Users Want #SpotlightWPO
  • 12. Measure performance #SpotlightWPO
  • 13. Tools, Formats and Browser Plugins • Browser plugins • “Waterfall” inside Firebug, Chrome etc • PageSpeed, YSlow and YSlow Plugin for 3rd party • HAR (ultrasound of a web page) • Based on the HTTP Archive specification • Captures web page loading information in a JSON format • Visualizing: HAR Viewer #SpotlightWPO
  • 14. Collecting measurements #SpotlightWPO
  • 15. Synthetic Testing and Real User Monitoring (RUM) Hand in hand #SpotlightWPO
  • 16. Synthetic Testing • You run the test • Establish a baseline performance level (e.g identify poor 3rd party scripts) • Measuring one exact configuration (of your choice) • Pitfalls • “[...] your real users are experiencing page load times that are twice as long as their corresponding synthetic measurements.” (Steve Souders) #SpotlightWPO
  • 17. Synthetic Testing - Tools • PageSpeed • Insights API curl "https://www.googleapis.com/pagespeedonline/v1/runPagespeed?url=http://sample.com&key=yourAPIKey" • Webpagetest.org • Public and private instances with RESTful API http://www.webpagetest.org/runtest.php?url=example.com&runs=3&k=apikey&f=json • Headless Scripts and Tools • phantomJS, confess, or write your own script #SpotlightWPO
  • 18. Real User Monitoring (RUM) • User runs the test • Measures the experience of the “actual” user • “It is the ground truth for what users are experiencing” (Steve Souders) • Get concrete information about user’s connectivity, latency, bandwidth etc. #SpotlightWPO
  • 19. RUM • Based on navigation timing !"#$%&'()&*+,$-(.(,)$ • Free Tools • Boomerang • Google Analytics • Vendors • Keynote • New Relic • and more... /0123344454"5+6)3-73,&'()&*+,8*.(,)3$#SpotlightWPO
  • 20. Canadian crown corporation Desktop site page views ~5Mio/day Mobile Touch site page views ~ 500K/day Canadian Broadcasting Corporation National public radio and television broadcaster Kind of like the BBC but not really - the CBC employs commercial advertising to supplement its federal funding #SpotlightWPO
  • 21. Mandate: The 1991 Broadcasting Acts states that... "...the Canadian Broadcasting Corporation, as the national public broadcaster, should provide radio and television services incorporating a wide range of programming that informs, enlightens and entertains; ...the programming provided by the Corporation should: vi. be made available throughout Canada by the most appropriate and efficient means and as resources become available for the purpose, and vii. reflect the multicultural and multiracial nature of Canada.” #SpotlightWPO
  • 22. Organizational Structure - Clients #SpotlightWPO
  • 23. CBC’s digital ecosystem #SpotlightWPO
  • 24. What constitutes a web product at CBC? #SpotlightWPO
  • 25. Anatomy of a CBC page • 3rd party scripts • Tracking (SiteCatalyst, ComScore, ClickTale) • Ads (GPT) • Social plugins (Gigya) • Content • Global header and footer (for branding) • Actual content to tell a story, e.g. Text, Video, Audio, Images etc. #SpotlightWPO
  • 26. Weight Check: Desktop and Mobile #SpotlightWPO
  • 27. A typical CBC story page #SpotlightWPO
  • 28. Let’s put them on a scale! Content Breakdown #SpotlightWPO
  • 29. Content Breakdown - Mobile #SpotlightWPO
  • 30. Content Breakdown - Mobile Fully loaded 247kB HTTP requests 36 #SpotlightWPO
  • 31. Content Breakdown - Desktop #SpotlightWPO
  • 32. Content Breakdown - Desktop #SpotlightWPO
  • 33. Content Breakdown - Desktop Fully loaded 1,539kB HTTP requests 164 #SpotlightWPO
  • 34. Too heavy? Compared to what though...? #SpotlightWPO
  • 35. httparchive.org The HTTP Archive tracks how the web is built #SpotlightWPO
  • 36. Desktop - Total Transfer Size November 2010 - March 2013: + ~50% 1211kB 90 req. #SpotlightWPO
  • 37. Mobile - Total Transfer Size June 2011 - March 2013: + ~50% 720kB 60 req. #SpotlightWPO
  • 38. The average page will hit 2MB by 2015 Images and 3rd party scripts are the main culprits #SpotlightWPO
  • 40. Temptations • That’s a lot of cookies Yikes! Oh No!
  • 41. Temptations Tipping the scale #SpotlightWPO
  • 42. Cookies on a Diet • Use the path option to limit cookie scope • Store your static assets at a different domain (images.cbc.ca) • Don’t use cookies for fun. Ask: Do you really need them? #SpotlightWPO
  • 43. Common temptations of a front-end dev #SpotlightWPO
  • 44. Temptations Let’s use those Yeah yeah, 2MB retina I want to I’ll optimize images for use that later every cool new platform plugin I just found Sure, I’ll add Wait....I just want to that new make it pretty (and social media prettier) plugin #SpotlightWPO
  • 45. 3rd Party Monsters #SpotlightWPO
  • 46. Monsters? • Kinds of monsters • Ads, tracking, social buttons • They are unpredictable, scary, disruptive, sneaky and • Could slow down your site • Could bring down your site (Single Point of Failure) • Could do things you don’t want them to do • Add weight and complexity to your page #SpotlightWPO
  • 47. What would a life without ads feel like....???? #SpotlightWPO
  • 48. The wonderful life without ads.... #SpotlightWPO
  • 49. CBC without mobile touch ads.... • Using server-side ads code over client-side code saved us ~20% of load time • Using no ads in comparison to client-side ads reduced our load time by ~40% #SpotlightWPO
  • 50. And the danger with all diets .... #SpotlightWPO
  • 51. Yo-yo effect • Keep the excitement and awareness • Be diligent and stay focused • Don’t gain the weight back #SpotlightWPO
  • 52. Monitor your fitness level So you can identify your problem areas #SpotlightWPO
  • 53. Monitoring your fitness level Alerts #SpotlightWPO
  • 54. Monitoring your fitness level Automated Reports #SpotlightWPO
  • 55. Monitor and test your speed (Mobile) • Device testing and speed simulation • Adobe Edge • shim (Boston Globe) • Slowy • Remote debugging • Weinre / debug.phonegap.com • Bookmarklets (Firebug Lite, YSlow) • Safari Remote Web Inspector #SpotlightWPO
  • 56. Monitor and average the Unpredictable Typical (breaking) news traffic • Difficult to measure average, visitors
  • 57. Create your own performance dashboard #SpotlightWPO
  • 58. Create your own perf dashboard • Run WebPageTest on your own server and export HAR files • Automate your test runs • Use js tools to visualize (Google chart tools, d3.js) #SpotlightWPO
  • 59. Create your own perf dashboard • JavaScript based tools • PhantomJS: headless webkit with JavaScript API • CasperJS: navigation scripting and testing utility for PhantomJS • boomerang.js (JavaScript library for RUM): measures the page load time experienced by real users #SpotlightWPO
  • 60. Stay in shape #SpotlightWPO
  • 62. Front-End • Google • https://developers.google.com/speed/docs/best-practices/ rules_intro • Yahoo • http://developer.yahoo.com/performance/rules.html #SpotlightWPO
  • 63. Front-End • Conditional loading • Be careful on the 3rd party scripts (SPOF) • Avoid re-rendering DOM elements • Use data:uri • Encoded in base 64 format • For example, can be used to replace background images < 2kB #SpotlightWPO
  • 64. data:uri • Task: CBC Gem • Performance test 30px • no background image, pure CSS • png background image inside CSS 30px • data:uri (encoded png as base 64) inside CSS • Conditions • all minified, concatenated, compressed #SpotlightWPO
  • 65. data:uri - pure CSS #SpotlightWPO
  • 66. data:uri - png bg img in CSS #SpotlightWPO
  • 67. data:uri in CSS #SpotlightWPO
  • 68. Performance comparison pure CSS PNG in CSS data:uri in CSS HTTP requests 2 3 2 Bytes in kB 4.1 2.9 3.3 Load Time 0.303s 0.389 0.26 (Median) #SpotlightWPO
  • 69. Server and Back-End • Last mile acceleration (use GZip compression) • Take advantage of a CDN, if possible • Only use cookies where necessary • Caches are your friend #SpotlightWPO
  • 70. Dedicated mobile sites #SpotlightWPO
  • 71. Server-side Optimization & Device Detection • Decide on the server what to serve • Different websites (Text, Rich, Touch) for optimized experience • Optimized and different images for all of our 3 mobile sites • Edge side include technology (ESI) for device detection and/or conditional loading #SpotlightWPO
  • 72. Responsive Web Design and Web Performance “72% of the sites using responsive design don't optimize for mobile” (Guy Podjarny) (86% in 2012) #SpotlightWPO
  • 73. How about RESS? • Responsive Web Design with Server Side Components • Heavy resource lifting should be done on the server #SpotlightWPO
  • 74. Second Screen Example - RESS Touch Mobile Tablet Desktop low-res images and mobile ads retina high-res images and mobile ads high-res images and fullsite ads #SpotlightWPO
  • 75. RESS - Server Side Component #SpotlightWPO
  • 76. RESS - RWD component #SpotlightWPO
  • 77. Exercises that worked for CBC #SpotlightWPO
  • 78. The Power of 304 • Very important to support If-Modified-Since requests • Allows caches to properly cache content. Don’t cache bust! #SpotlightWPO
  • 79. The Proof 28kb 12kb #SpotlightWPO
  • 81. Keep those 404s in check • Heavy 404 Page? • Browser will download the 404 page even if it’s for a broken image or other asset #SpotlightWPO
  • 83.
  • 84.
  • 85. The Difference... • 5.2kB versus 1.4kB • Savings of ~75% #SpotlightWPO
  • 86. Global Shell • Shared by all • Visual representation • Non-visual representation • SSI variables in header to serve ads and tracking • Global scripts and stylesheets • SiteCatalyst and ComScore #SpotlightWPO
  • 87. Improvement is easier than you think #SpotlightWPO
  • 88. How did we improve? Simple! • Re-factored code: Removed old/un-used code • Moved some scripts to the bottom of page • Minified and concatenated scripts and CSS files to reduce file size and HTTP requests #SpotlightWPO
  • 89. How did we improve? • Why optimizing manually if you can just automate it • Included performance optimization into your deploy and release process #SpotlightWPO
  • 90. Automated & Built-in Performance Tips • Maven, Ant Tools and Plugins • Closure Compiler (Google) • Minify-maven-plugin • HTMLCompressor • Confess • cssembed.jar for data:uri #SpotlightWPO
  • 91. Automated & Built-in Performance Tips • If you can’t / don’t want to use Maven / Ant • Taskrunners and Scaffolding: Grunt, Yeoman • Continuous integration • Jenkins and Hudson #SpotlightWPO
  • 92. What were the results? #SpotlightWPO
  • 93. Global Shell #SpotlightWPO
  • 94. Global Shell Area Before After Improvement (in %) HTTP 24 18 25 Requests Page Weight 71.9kB 69.8kB 3 Page Load* 3.16s 1.91s 40 *Page load depends on connection and latency #SpotlightWPO
  • 95. If you don’t monitor your weight, you can also make it worse... ...and you’ll get unexpected visitors again ..yo-yo effect #SpotlightWPO
  • 97. 3rd Party Monsters interrupt ((" ()" ISP issues Client-side scripts '" &" !"#$%&'( %" $" #" Global Shell !" $*+(*(+" $*+&*(+" %*#*(+" %*(+*(+" %*('*(+" %*+$*(+" &*+*(+" &*'*(+" &*($*(+" &*+,*(+" &*,)*(+" '*$*(+" '*(,*(+" '*+)*(+" '*+%*(+" ()*!*(+" ()*((*(+" ()*(&*(+" Data from Keynote #SpotlightWPO
  • 98. A user who has to endure an 8-second download delay spends only 1% of their total viewing time looking at the featured promotional space on a landing page. In contrast, a user who receives instantaneous page rendering spends 20% of viewing time within the promotional area (source: Nielsen) #SpotlightWPO
  • 99. CBC’s fitness tips - Take aways #SpotlightWPO
  • 100. Share your results Fitness Tip #SpotlightWPO
  • 101. “It’s not about what you can add, it’s about what you can’t take away” (Christian Heilmann, The Vanilla Web Diet) Fitness Tip #SpotlightWPO
  • 102. You can never measure and test enough Run tests frequently Fitness Tip #SpotlightWPO
  • 103. Show graphs and complexity to illustrate performance success and also bad hits A picture is worth a thousand words Fitness Tip #SpotlightWPO
  • 104. Make it fun and painless, make it part of your daily routine Automated Performance within your organization Fitness Tip #SpotlightWPO
  • 105. Watch those 3rd party monsters Evaluate their impact, ask and push for server-side solutions Fitness Tip #SpotlightWPO
  • 106. Serve only what the client needs Device Detection, Server-side components and Responsive Web Design Fitness Tip #SpotlightWPO
  • 107. Share your ideas and knowledge Web Performance Working Group Fitness Tip #SpotlightWPO
  • 108. Create a culture of performance Bring everyone on board Fitness Tip #SpotlightWPO
  • 109. Set a Performance Budget Fitness Tip #SpotlightWPO
  • 110. Performance Budget • Be diligent and cautious about new features • Set a baseline / weight (e.g. BBC 10 seconds on 3G/GPS) • Evaluate a good conversion rate, cost vs. revenue • Visit HTTP Archive for comparison • Always evaluate what you can take away (content breakdown) #SpotlightWPO
  • 111. Samples of Performance Budget • Set a budget for 3rd party scripts • “Should not weigh more than ...” • Evaluate the need for frameworks • Run quick performance tests on mocks #SpotlightWPO
  • 112. Questions? #SpotlightWPO /blakecrosby /bbinto We’re hiring! Thank you! #SpotlightWPO
  • 113. Photo Credits •http://beautygirlsmom.com/wp-content/uploads/2011/01/diet-funny-sign-spelled-out-vegetable.jpg •http://photobucket.com/images/yo+yo+puppy+dog+yoyo+animated+gif+funny/ •http://www.wallpaper-welt.de/gros/film/monster-ag/Monster%20AG.jpg •http://www.passiveaggressivenotes.com/2007/07/29/this-is-why-your-server-is-cranky/ •http://4.bp.blogspot.com/-NnFPM5Fgbao/TaIkVwyusEI/AAAAAAAAMPw/fdDbbvgJRb8/s1600/054.jpg •http://thefulltimedomesticgoddess.com/wp-content/uploads/2011/09/girls-holding-hands-bw.jpg •http://cartoonswalls.com/walls/monsters_university_desktop_wallpaper-wide.jpg •http://41inmylife.files.wordpress.com/2011/06/weight_scale.jpg •http://blogs.scientificamerican.com/the-curious-wavefunction/files/2012/08/boeing_777_cockpit.jpg Sources •http://www.slideshare.net/stoyan/psychology-of-performance •http://www.stevesouders.com/blog/2012/11/14/comparing-rum-synthetic-page-load-times/ •http://bradfrostweb.com/blog/post/performance-as-design/ •“Who killed my battery: Analyzing Mobile Browser Consumption” http://www2012.wwwconference.org/proceedings/proceedings/p41.pdf •http://www.slideshare.net/guypod/performance-implications-of-mobile-design •http://www.cbc.ca/m/touch/sports/story/2013/03/05/sp-paralympics-oscar-pistorius.html •Desktop: http://www.webpagetest.org/result/130315_TQ_WT1/ •Mobile:http://www.webpagetest.org/result/130315_1X_X18/ •http://coding.smashingmagazine.com/2012/11/13/the-vanilla-web-diet/ •http://www.gomez.com/wp-content/downloads/19986_WhatMobileUsersWant_Wp.pdf #SpotlightWPO