Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JakartaJS - Web Performance Budgeting

Avatar for dodotdot dodotdot
October 26, 2017

JakartaJS - Web Performance Budgeting

An insight about web performance optimitization on technical budget
https://www.meetup.com/JakartaJS/events/243384172/

Avatar for dodotdot

dodotdot

October 26, 2017
Tweet

More Decks by dodotdot

Other Decks in Technology

Transcript

  1. Disclaimer Presentations are intended for educational purposes only and not

    to replace independent professional judgment. Statements of facts and opinions expressed here are those of the participant’s personally and do not necessarily reflect those of Blibli.com. Blibli.com does not endorse nor approve, and assumes no responsibility for the content, accuracy or completeness of the information presented.
  2. Introduction • Herwidodo Kusumobroto • Sr. Software Developer Engineer at

    Blibli.com • Join Blibli on 2015 • Frontend engineer and web performance
  3. Agenda - What is Perfbudget - Why - Measurement (metrics,

    tools, type) - How fast - Navigation timing - Speed index - Case Study
  4. What is performance budgets - Enable Gzip compresion - Minify

    HTML, CSS, JS - Minimize Redirect - Combine JS Files - Use image sprites - Style in header, scripst in footer - Lazyload images - Optimized Images - Defer JS Parsing - Reduce DNS Lookups
  5. What is performance budgets A clearly defined performance goal used

    to guide design & development Performance is a critical component of the user experience of any site or application. Making sure what we build is fast and lightweight requires more than just technical tweaks—we have to find ways to prioritize performance from start to finish. Setting and maintaining a performance budget is one of the most effective ways of keeping performance up front in center. Tim Kadlec @akamai
  6. Why? Why should we care about web performance? Wondering the

    web is like this iceberg mountain Copyright - Brad Frost
  7. Performance budgeting • Performance should never be sacrificed for the

    sake of presentation. In fact, studies have found that about 37% of users find site performance to be more important than its functionality, and, even more alarming, 57% of users will leave a site if it takes longer than 3 seconds to load. Thankfully aesthetic value doesn’t have to be sacrificed either—it just requires a little bit of thinking. • Paul Irish, a Google Chrome Developer Advocate, recommends a speed index of under 1000 and to deliver the above-the-fold content in the first 14kb of the page.
  8. Measurement metrics Tools Synthetic Monitoring - Webpagetest.org - Google Pagespeed

    insight - Yslow RUM (Real User Monitoring) - New relic - Speedcurve - Soasta m-pulse
  9. SpeedIndex Perceptual Speed Index is a page load performance metric

    that shows you how quickly the contents of a page are visibly populated. The lower the score, the better.
  10. SpeedIndex The Speed Index is the "area above the curve"

    calculated in ms and using 0.0- 1.0 for the range of visually complete. The calculation looks at each 0.1s interval and calculates IntervalScore = Interval * (1.0 - (Completeness/100)) where Completeness is the % Visually complete for that frame and Interval is the elapsed time for that video frame in ms (100 in this case). The overall score is just a sum of the individual intervals: SUM(IntervalScore)
  11. How Fast is Fast Enough? • Instant (0.1-0.2 seconds) is

    when there is no perceptible "lag" in response. For example, when clicking a button on a website, the button should depress instantly to mirror the pressing of a button in real life. • Immediate (0.5-1s) is the time a user expects a reaction but not necessarily a response. A prime example would be the acknowledgement (a nod, perhaps) that you are hearing someone when they are talking to you. • User Flow (2-5s) is the time when the person is most likely to experience "concentration, absolute absorption in an activity and deep enjoyment." Delivering information within this time frame gives it the best chance of being consumed. • Attention Span (5-10s) is the time a user is increasingly likely to become distracted and disengaged.
  12. How Fast is Fast Enough? 20% Optimize rules The Weber-Fechner

    Law can be simplified into a 20% rule for short time durations. (JND = Just Noticable difference)
  13. Quotes “Best Request is No request. Worst request is one

    that Block the parser.” - Illya Grigorik @ilyagrigorik