Velocity 2010

48
VELOCITY 2010 fast by default segunda-feira, 25 de outubro de 2010

description

Presentation done in 25/10/2010

Transcript of Velocity 2010

Page 1: Velocity 2010

VELOCITY 2010fast by default

segunda-feira, 25 de outubro de 2010

Page 2: Velocity 2010

HIGH PERFORMANCE WEB SITES

segunda-feira, 25 de outubro de 2010

Page 3: Velocity 2010

High YSlow Average

Home ......................................... A Dashboard ......................................... B

Permalink/Your Memes ......................................... B

segunda-feira, 25 de outubro de 2010

Page 4: Velocity 2010

WEB PAGE TEST

segunda-feira, 25 de outubro de 2010

Page 5: Velocity 2010

WEB PAGE TEST

segunda-feira, 25 de outubro de 2010

Page 6: Velocity 2010

IMPROVEMENTS

LOAD ORDER(SPLIT) AND

RENDER

segunda-feira, 25 de outubro de 2010

Page 7: Velocity 2010

LOAD ORDER(SPLIT)

segunda-feira, 25 de outubro de 2010

Page 8: Velocity 2010

SPLIT SCRIPTS EFFICIENTLY

segunda-feira, 25 de outubro de 2010

Page 9: Velocity 2010

SPLIT SCRIPTS EFFICIENTLY

Use cross page cache

segunda-feira, 25 de outubro de 2010

Page 10: Velocity 2010

SPLIT SCRIPTS EFFICIENTLY

Use cross page cache

Use Data to Split

segunda-feira, 25 de outubro de 2010

Page 11: Velocity 2010

Authenticated vs Public

MEME, from Yahoo!

1000/1 U.P.P.A(segundo Pedro Valente)

segunda-feira, 25 de outubro de 2010

Page 12: Velocity 2010

Permalink (530k/886k)

NonAuthenticated

minipost

more comments

user card

ckeditor

tooltip

user menu

repost

follow

live briefing

Authenticated

segunda-feira, 25 de outubro de 2010

Page 13: Velocity 2010

Authenticated vs Public

Split by:

SCRIPTS FOR AUTHENTICATED USERSSCRIPTS FOR PUBLIC USERS

segunda-feira, 25 de outubro de 2010

Page 14: Velocity 2010

Split by Necessity of Execution

Load Order Improvement

segunda-feira, 25 de outubro de 2010

Page 15: Velocity 2010

segunda-feira, 25 de outubro de 2010

Page 16: Velocity 2010

Split by Necessity of Execution

Yahoo ......................................... 16%Facebook ............................................ 9%

segunda-feira, 25 de outubro de 2010

Page 17: Velocity 2010

Split by Necessity of Execution

Yahoo ......................................... 16%Facebook ............................................ 9%

Meme ....................................... ˜15%

segunda-feira, 25 de outubro de 2010

Page 18: Velocity 2010

Spliting Scripts

SCRIPTS FOR AUTHENTICATED USERS(what have to be executed)

SCRIPTS FOR PUBLIC USERS(what have to be executed)

segunda-feira, 25 de outubro de 2010

Page 19: Velocity 2010

Spliting Scripts

Your Memes ............ 358k (-15%) = 53.7k

Dashboard ................. 710k (-15%) = 106k

segunda-feira, 25 de outubro de 2010

Page 20: Velocity 2010

Spliting Scripts

Tool: Doloto (MS Research)http://research.microsoft.com/en-us/projects/doloto/

segunda-feira, 25 de outubro de 2010

Page 21: Velocity 2010

Spliting Scripts(Techniques)

XHR EvalXHR InjectionsScript in Iframe

Script DOM ElementScript Defer

segunda-feira, 25 de outubro de 2010

Page 22: Velocity 2010

Spliting Scripts(Techniques)

XHR EvalXHR InjectionsScript in Iframe

Script DOM ElementScript Defer

segunda-feira, 25 de outubro de 2010

Page 23: Velocity 2010

RENDERING

segunda-feira, 25 de outubro de 2010

Page 24: Velocity 2010

HTML

CSS

INLINE CSS

INLINE JS

DONE!

BLOCK RENDERING

BLOCK RENDERING

BLOCK RENDERING &

DOWNLOADS

segunda-feira, 25 de outubro de 2010

Page 25: Velocity 2010

AVOID INLINE

Block downloads and rendering

segunda-feira, 25 de outubro de 2010

Page 26: Velocity 2010

PERCEPTION OF PERFORMANCE

segunda-feira, 25 de outubro de 2010

Page 27: Velocity 2010

PERCEPTION OF PERFORMANCE

segunda-feira, 25 de outubro de 2010

Page 28: Velocity 2010

PERCEPTION OF PERFORMANCE

Feedbackand

Responsiveness

segunda-feira, 25 de outubro de 2010

Page 29: Velocity 2010

OLD TECHNIQUES

Progressive Bar

Loaders

segunda-feira, 25 de outubro de 2010

Page 30: Velocity 2010

NOT SO OLD TECHNIQUES..

Progressive Enhancement

segunda-feira, 25 de outubro de 2010

Page 31: Velocity 2010

NOT SO OLD TECHNIQUES..

Chunked Transfer Encoding

segunda-feira, 25 de outubro de 2010

Page 32: Velocity 2010

Chunked Tranfer Encoding

Is a mechanism of HTTP 1.1

Split response data and transmitting each chuck with its size

segunda-feira, 25 de outubro de 2010

Page 33: Velocity 2010

segunda-feira, 25 de outubro de 2010

Page 34: Velocity 2010

segunda-feira, 25 de outubro de 2010

Page 35: Velocity 2010

<html> <head>....</head> <body> <div id=”hot_news”> [...] </div> <div id=”old_news”> [...] </div> <div id=”other_options”> [...] </div> </body></html>

1

2

3

4

segunda-feira, 25 de outubro de 2010

Page 36: Velocity 2010

Better used when the site structure is in sync with this strategy

segunda-feira, 25 de outubro de 2010

Page 37: Velocity 2010

chunckview

Tool

segunda-feira, 25 de outubro de 2010

Page 38: Velocity 2010

segunda-feira, 25 de outubro de 2010

Page 39: Velocity 2010

segunda-feira, 25 de outubro de 2010

Page 40: Velocity 2010

segunda-feira, 25 de outubro de 2010

Page 41: Velocity 2010

Facebook Big Pipechunked tranfer encoding + pagelets

segunda-feira, 25 de outubro de 2010

Page 42: Velocity 2010

segunda-feira, 25 de outubro de 2010

Page 43: Velocity 2010

RECOMMENDEDPRESENTATIONS

segunda-feira, 25 de outubro de 2010

Page 44: Velocity 2010

Stupid Web Caching (and Other Intermediary) Tricks

Mark Nottingham - @mnot - Yahoo

segunda-feira, 25 de outubro de 2010

Page 45: Velocity 2010

The Top 5 Mistakes of Massive CSS

Nicole Sullivan - @stubbornella - Facebook

segunda-feira, 25 de outubro de 2010

Page 46: Velocity 2010

TCP and The Lower Bound of Web PerformanceCreating Cultural Change

John Rauser - @jrauser - Amazon

segunda-feira, 25 de outubro de 2010

Page 47: Velocity 2010

JSMeter: Characterizing Real-World Behavior of JavaScript Programs

Ben Livshits - Microsoft ResearchBen Zorn - Microsoft Research

segunda-feira, 25 de outubro de 2010

Page 48: Velocity 2010

CONCLUSIONS

Focused on performanceMore frontend presentations

Backend has domain specific problems

segunda-feira, 25 de outubro de 2010