SlideShare une entreprise Scribd logo
1  sur  34
Adaptive Static Resource Optimization AJAXian Conference 2009 Sep 15, 2009 Boston, MA David Wei and ChanghaoJiang
Agenda
Optimization has to be adaptive!
Facebook: a site powered by AJAX Challenges day-to-day ,[object Object]
Viral Adoption
Agile Development,[object Object]
Why we need adaptive packaging? Day 2: Some smart engineers run YSlow and thinks… <Print css tag for feature A> <Print css tag for feature B> <Print css tag for feature C> <print HTML of feature A> <print HTML of feature B> <print HTML of feature C> … “A & B & C are always used; let’s package them together!”
Why we need adaptive packaging? Day 2: Awesome!  <Print css tag for feature A&B&C> <print HTML of feature A> <print HTML of feature B> <print HTML of feature C> …
Why we need adaptive packaging? Day 3: feature C evolves… <Print css tag for feature A & B & C> <print HTML of feature A> <print HTML of feature B> If (users_signup_for_C()) { <print HTML of feature C>} …
Why we need adaptive packaging? Day 3: <Print css tag for feature A & B & C> <print HTML of feature A> <print HTML of feature B> If (users_signup_for_C()) { <print HTML of feature C>} … A&B are always used, while C is not. ..
Why we need adaptive packaging? Day 4: feature C is deprecated <Print css tag for feature A & B & C> <print HTML of feature A> <print HTML of feature B> // no one uses C { <print HTML of feature C>} …
Why we need adaptive packaging? Day 4: we start to send unused bits <Print css tag for feature A & B & C> <print HTML of feature A> <print HTML of feature B> // no one uses C { <print HTML of feature C>} … It is hard to remember we should remove C here.
Why we need adaptive packaging? One months later… <Print css tag for feature A & B & C & D & E & F & G…> if (F is used) <print HTML of feature F> <print HTML of feature G> if (F is not used) { <print HTML of feature E>} … Thousands of dead CSS rules in the package.
Static Resource Management @ Facebook Challenges: ,[object Object]
Viral Adoption
Agile Development Responses: ,[object Object]
Requirement declaration: lives with HTML generation
Delivery: Globally optimized based on trace analysis,[object Object]
Static Resource Management  Separate Declaration from actual Delivery               Back to Day 1:  require_static(A_css); <render HTML of feature A> require_static(B_css); <render HTML of feature B> require_static(C_css);<render HTML of feature C> <deliver all required CSS> <print all rendered HTML> Requirement Declaration lives with HTML  Global Optimization on Delivery
Offline analysis Packager: Global JS/CSS Optimization Online process require_static(A_css); <render HTML of feature A> require_static(B_css); <render HTML of feature B> require_static(C_css); <render HTML of feature C> <deliver all required CSS> <print all rendered HTML> Usage Pattern logs Packaging algorithm “Optimal” packages
Packager: models Cost/Benefit tradeoff model: To package two CSS/JS files A & B: Cost: for page requests that only uses A, we waste the bytes of B (bandwidth) Benefit: for page requests that uses both A and B: we save one round trip (latency ) Maximize “Profit” (Benefit – Cost) Future: Users with different network connections have different packaging solutions Usage Pattern logs Packaging algorithm “Optimal” packages
Packager: models Potential extensions (and trade-offs): Consider all resources used in user browsing sessions, instead of user page loads first page slower, subsequent pages faster Consider cache probability: new files change more New user slower, old users faster Consider other costs: CSS rules JS executions HTTP header overheads Usage Pattern logs Packaging algorithm “Optimal” packages
Packager: algorithm A classic optimization problem: Algorithms: Greedy algorithm Simulated Annealing Clustering algorithms Trade-off between offline computation cost and accuracy: Greedy is good enough for us Usage Pattern logs Packaging algorithm “Optimal” packages
Adaptive Performance Optimization: more Trace-based analysis for: ,[object Object]
Progressive rendering for common JS/CSS/Images
Prioritization of resource delivery,[object Object]
Packager: Deployment Fully deployed since Nov 2008 ,[object Object]
Javascript and CSS packaging only (image soon)
Efficiency monitors: size of wasted JS/CSS bytes; JS/CSS pkg numbers,[object Object]
Packager: scalable with development Nov 2008 => May 2009 ,[object Object]
 'js/lib/ui/timeeditor.js’,
 'resume/js/resumepro.js’,
 'resume/js/resumesection.js’,[object Object]

Contenu connexe

Tendances

Dynamic Rendering - is this really an SEO silver bullet? SMX WEST
Dynamic Rendering - is this really an SEO silver bullet? SMX WESTDynamic Rendering - is this really an SEO silver bullet? SMX WEST
Dynamic Rendering - is this really an SEO silver bullet? SMX WESTOnely
 
JavaScript Tips & Tricks 2018 - SMX East
JavaScript Tips & Tricks 2018 - SMX EastJavaScript Tips & Tricks 2018 - SMX East
JavaScript Tips & Tricks 2018 - SMX EastOnely
 
HTML5 - One spec to rule them all
HTML5 - One spec to rule them allHTML5 - One spec to rule them all
HTML5 - One spec to rule them allStu King
 
The New Renaissance of JavaScript - SMX London 2019
The New Renaissance of JavaScript - SMX London 2019The New Renaissance of JavaScript - SMX London 2019
The New Renaissance of JavaScript - SMX London 2019Onely
 

Tendances (6)

Dynamic Rendering - is this really an SEO silver bullet? SMX WEST
Dynamic Rendering - is this really an SEO silver bullet? SMX WESTDynamic Rendering - is this really an SEO silver bullet? SMX WEST
Dynamic Rendering - is this really an SEO silver bullet? SMX WEST
 
Imagetag
ImagetagImagetag
Imagetag
 
JavaScript Tips & Tricks 2018 - SMX East
JavaScript Tips & Tricks 2018 - SMX EastJavaScript Tips & Tricks 2018 - SMX East
JavaScript Tips & Tricks 2018 - SMX East
 
HTML5 - One spec to rule them all
HTML5 - One spec to rule them allHTML5 - One spec to rule them all
HTML5 - One spec to rule them all
 
The New Renaissance of JavaScript - SMX London 2019
The New Renaissance of JavaScript - SMX London 2019The New Renaissance of JavaScript - SMX London 2019
The New Renaissance of JavaScript - SMX London 2019
 
PHP and CSS
PHP and CSSPHP and CSS
PHP and CSS
 

En vedette

09 10 Energy Sources Andie
09 10 Energy Sources Andie09 10 Energy Sources Andie
09 10 Energy Sources Andiecharsh
 
Drive (conduzir) sung The Cars PPS by Sonia Medeiros
Drive (conduzir) sung The Cars PPS by Sonia Medeiros   Drive (conduzir) sung The Cars PPS by Sonia Medeiros
Drive (conduzir) sung The Cars PPS by Sonia Medeiros Sonia Medeiros
 
Take my breath away - Roxette PPS by Sonia Medeiros
Take my breath away - Roxette PPS by Sonia Medeiros Take my breath away - Roxette PPS by Sonia Medeiros
Take my breath away - Roxette PPS by Sonia Medeiros Sonia Medeiros
 
150 Slater Sublease Flyer
150 Slater Sublease Flyer150 Slater Sublease Flyer
150 Slater Sublease Flyerscottbrooker
 
Smoothwall presentation feb open day
Smoothwall presentation feb open daySmoothwall presentation feb open day
Smoothwall presentation feb open dayVictoria College
 
Beginningyearparentpacket
BeginningyearparentpacketBeginningyearparentpacket
Beginningyearparentpacketozarktigertalk
 
Upgrading Share Point Portal Server 2003 Customizations To Share Point Server...
Upgrading Share Point Portal Server 2003 Customizations To Share Point Server...Upgrading Share Point Portal Server 2003 Customizations To Share Point Server...
Upgrading Share Point Portal Server 2003 Customizations To Share Point Server...RCSLLC
 
Work, home or work from home?
Work, home or work from home?Work, home or work from home?
Work, home or work from home?Wrike
 
Transmedia and the Independent Filmmaker
Transmedia and the Independent FilmmakerTransmedia and the Independent Filmmaker
Transmedia and the Independent FilmmakerRobert Pratten
 
Online Marketing Tips
Online Marketing TipsOnline Marketing Tips
Online Marketing TipsweBranding
 
201104.wv.uvacollegepeacebuilding
201104.wv.uvacollegepeacebuilding201104.wv.uvacollegepeacebuilding
201104.wv.uvacollegepeacebuildingWout Visser
 
Patrick Lightbody Presentation Tae Slides
Patrick Lightbody Presentation Tae SlidesPatrick Lightbody Presentation Tae Slides
Patrick Lightbody Presentation Tae SlidesAjax Experience 2009
 
Why we need sports character development
Why we need sports character developmentWhy we need sports character development
Why we need sports character developmentIntello
 
2020 Social Decoding Employee Communities
2020 Social Decoding Employee Communities2020 Social Decoding Employee Communities
2020 Social Decoding Employee Communities2020 Social
 
What I Learned About Linkedin
What I Learned About LinkedinWhat I Learned About Linkedin
What I Learned About Linkedinbonnie725
 
On the streets of Bay Ridge
On the streets of Bay RidgeOn the streets of Bay Ridge
On the streets of Bay RidgeKaren Wagner
 

En vedette (20)

09 10 Energy Sources Andie
09 10 Energy Sources Andie09 10 Energy Sources Andie
09 10 Energy Sources Andie
 
Drive (conduzir) sung The Cars PPS by Sonia Medeiros
Drive (conduzir) sung The Cars PPS by Sonia Medeiros   Drive (conduzir) sung The Cars PPS by Sonia Medeiros
Drive (conduzir) sung The Cars PPS by Sonia Medeiros
 
Eklavya gold v1.2
Eklavya gold v1.2Eklavya gold v1.2
Eklavya gold v1.2
 
Take my breath away - Roxette PPS by Sonia Medeiros
Take my breath away - Roxette PPS by Sonia Medeiros Take my breath away - Roxette PPS by Sonia Medeiros
Take my breath away - Roxette PPS by Sonia Medeiros
 
150 Slater Sublease Flyer
150 Slater Sublease Flyer150 Slater Sublease Flyer
150 Slater Sublease Flyer
 
Smoothwall presentation feb open day
Smoothwall presentation feb open daySmoothwall presentation feb open day
Smoothwall presentation feb open day
 
Beginningyearparentpacket
BeginningyearparentpacketBeginningyearparentpacket
Beginningyearparentpacket
 
To be present1 eso
To be present1 esoTo be present1 eso
To be present1 eso
 
Upgrading Share Point Portal Server 2003 Customizations To Share Point Server...
Upgrading Share Point Portal Server 2003 Customizations To Share Point Server...Upgrading Share Point Portal Server 2003 Customizations To Share Point Server...
Upgrading Share Point Portal Server 2003 Customizations To Share Point Server...
 
Work, home or work from home?
Work, home or work from home?Work, home or work from home?
Work, home or work from home?
 
Transmedia and the Independent Filmmaker
Transmedia and the Independent FilmmakerTransmedia and the Independent Filmmaker
Transmedia and the Independent Filmmaker
 
Online Marketing Tips
Online Marketing TipsOnline Marketing Tips
Online Marketing Tips
 
201104.wv.uvacollegepeacebuilding
201104.wv.uvacollegepeacebuilding201104.wv.uvacollegepeacebuilding
201104.wv.uvacollegepeacebuilding
 
Patrick Lightbody Presentation Tae Slides
Patrick Lightbody Presentation Tae SlidesPatrick Lightbody Presentation Tae Slides
Patrick Lightbody Presentation Tae Slides
 
Why we need sports character development
Why we need sports character developmentWhy we need sports character development
Why we need sports character development
 
2020 Social Decoding Employee Communities
2020 Social Decoding Employee Communities2020 Social Decoding Employee Communities
2020 Social Decoding Employee Communities
 
Comparative and Superlative - as-as 4 ESO
Comparative and Superlative - as-as 4 ESOComparative and Superlative - as-as 4 ESO
Comparative and Superlative - as-as 4 ESO
 
What I Learned About Linkedin
What I Learned About LinkedinWhat I Learned About Linkedin
What I Learned About Linkedin
 
Eprd easy-community garden
Eprd easy-community gardenEprd easy-community garden
Eprd easy-community garden
 
On the streets of Bay Ridge
On the streets of Bay RidgeOn the streets of Bay Ridge
On the streets of Bay Ridge
 

Similaire à David Wei And Changhao Jiang Presentation

HTML5 Overview
HTML5 OverviewHTML5 Overview
HTML5 Overviewreybango
 
What I brought back from Austin
What I brought back from AustinWhat I brought back from Austin
What I brought back from AustinLisa Adkins
 
Microsoft and jQuery: A true love story - templating and other contributions
Microsoft and jQuery: A true love story - templating and other contributionsMicrosoft and jQuery: A true love story - templating and other contributions
Microsoft and jQuery: A true love story - templating and other contributionsjamessenior
 
Lecture 6 - Comm Lab: Web @ ITP
Lecture 6 - Comm Lab: Web @ ITPLecture 6 - Comm Lab: Web @ ITP
Lecture 6 - Comm Lab: Web @ ITPyucefmerhi
 
HTML5 - techMaine Presentation 5/18/09
HTML5 - techMaine Presentation 5/18/09HTML5 - techMaine Presentation 5/18/09
HTML5 - techMaine Presentation 5/18/09pemaquid
 
Font End Development + Automation with Django
Font End Development + Automation with DjangoFont End Development + Automation with Django
Font End Development + Automation with DjangoEvan Reiser
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax componentsIgnacio Coloma
 
RDFa: The Semantic Web's Missing Link
RDFa: The Semantic Web's Missing LinkRDFa: The Semantic Web's Missing Link
RDFa: The Semantic Web's Missing LinkMark Birbeck
 
HTML5 with examples
HTML5 with examplesHTML5 with examples
HTML5 with examplesgopivthmk
 
Peter lubbers-html5-overview-sf-dev-conf-2011
Peter lubbers-html5-overview-sf-dev-conf-2011Peter lubbers-html5-overview-sf-dev-conf-2011
Peter lubbers-html5-overview-sf-dev-conf-2011Peter Lubbers
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Matt Raible
 
Fast Loading JavaScript
Fast Loading JavaScriptFast Loading JavaScript
Fast Loading JavaScriptAaron Peters
 
Lecture 1 - Comm Lab: Web @ ITP
Lecture 1 - Comm Lab: Web @ ITPLecture 1 - Comm Lab: Web @ ITP
Lecture 1 - Comm Lab: Web @ ITPyucefmerhi
 
WordPress Development Confoo 2010
WordPress Development Confoo 2010WordPress Development Confoo 2010
WordPress Development Confoo 2010Brendan Sera-Shriar
 

Similaire à David Wei And Changhao Jiang Presentation (20)

HTML5 Overview
HTML5 OverviewHTML5 Overview
HTML5 Overview
 
What I brought back from Austin
What I brought back from AustinWhat I brought back from Austin
What I brought back from Austin
 
Microsoft and jQuery: A true love story - templating and other contributions
Microsoft and jQuery: A true love story - templating and other contributionsMicrosoft and jQuery: A true love story - templating and other contributions
Microsoft and jQuery: A true love story - templating and other contributions
 
Lecture 6 - Comm Lab: Web @ ITP
Lecture 6 - Comm Lab: Web @ ITPLecture 6 - Comm Lab: Web @ ITP
Lecture 6 - Comm Lab: Web @ ITP
 
HTML5 - techMaine Presentation 5/18/09
HTML5 - techMaine Presentation 5/18/09HTML5 - techMaine Presentation 5/18/09
HTML5 - techMaine Presentation 5/18/09
 
Font End Development + Automation with Django
Font End Development + Automation with DjangoFont End Development + Automation with Django
Font End Development + Automation with Django
 
Shifting Gears
Shifting GearsShifting Gears
Shifting Gears
 
HTML5
HTML5HTML5
HTML5
 
Grails and Dojo
Grails and DojoGrails and Dojo
Grails and Dojo
 
HTML5 Fundamentals
HTML5 FundamentalsHTML5 Fundamentals
HTML5 Fundamentals
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 
RDFa: The Semantic Web's Missing Link
RDFa: The Semantic Web's Missing LinkRDFa: The Semantic Web's Missing Link
RDFa: The Semantic Web's Missing Link
 
HTML5 with examples
HTML5 with examplesHTML5 with examples
HTML5 with examples
 
Html5
Html5Html5
Html5
 
Peter lubbers-html5-overview-sf-dev-conf-2011
Peter lubbers-html5-overview-sf-dev-conf-2011Peter lubbers-html5-overview-sf-dev-conf-2011
Peter lubbers-html5-overview-sf-dev-conf-2011
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
 
Fast Loading JavaScript
Fast Loading JavaScriptFast Loading JavaScript
Fast Loading JavaScript
 
Lecture 1 - Comm Lab: Web @ ITP
Lecture 1 - Comm Lab: Web @ ITPLecture 1 - Comm Lab: Web @ ITP
Lecture 1 - Comm Lab: Web @ ITP
 
Html5
Html5Html5
Html5
 
WordPress Development Confoo 2010
WordPress Development Confoo 2010WordPress Development Confoo 2010
WordPress Development Confoo 2010
 

Plus de Ajax Experience 2009

Adam Peller Interoperable Ajax Tools And Mashups
Adam Peller Interoperable Ajax Tools And MashupsAdam Peller Interoperable Ajax Tools And Mashups
Adam Peller Interoperable Ajax Tools And MashupsAjax Experience 2009
 
Eric Beland Ajax Load Testing Considerations
Eric Beland Ajax Load Testing ConsiderationsEric Beland Ajax Load Testing Considerations
Eric Beland Ajax Load Testing ConsiderationsAjax Experience 2009
 
Chanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling PagecacheChanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling PagecacheAjax Experience 2009
 
Jason.O Keefe.Genuitec.Presentation.Final
Jason.O Keefe.Genuitec.Presentation.FinalJason.O Keefe.Genuitec.Presentation.Final
Jason.O Keefe.Genuitec.Presentation.FinalAjax Experience 2009
 
Colin Clark Accessible U Is With J Query And Infusion[1]
Colin Clark Accessible U Is With J Query And Infusion[1]Colin Clark Accessible U Is With J Query And Infusion[1]
Colin Clark Accessible U Is With J Query And Infusion[1]Ajax Experience 2009
 
Scott Isaacs Presentationajaxexperience (Final)
Scott Isaacs Presentationajaxexperience (Final)Scott Isaacs Presentationajaxexperience (Final)
Scott Isaacs Presentationajaxexperience (Final)Ajax Experience 2009
 
Sergey Ilinsky Presentation Ample Sdk
Sergey Ilinsky Presentation Ample SdkSergey Ilinsky Presentation Ample Sdk
Sergey Ilinsky Presentation Ample SdkAjax Experience 2009
 
Chris Williams Presentation Dissident
Chris Williams Presentation DissidentChris Williams Presentation Dissident
Chris Williams Presentation DissidentAjax Experience 2009
 
Ted Husted Presentation Testing Ajax Applications Ae2009
Ted Husted Presentation Testing Ajax Applications Ae2009Ted Husted Presentation Testing Ajax Applications Ae2009
Ted Husted Presentation Testing Ajax Applications Ae2009Ajax Experience 2009
 
Ted Husted Api Doc Smackdown Ae2009
Ted Husted Api Doc Smackdown Ae2009Ted Husted Api Doc Smackdown Ae2009
Ted Husted Api Doc Smackdown Ae2009Ajax Experience 2009
 
Laurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationLaurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationAjax Experience 2009
 
Jon Trelfa Presentation From Desktop To Web – Getting It Right
Jon Trelfa Presentation From Desktop To Web – Getting It RightJon Trelfa Presentation From Desktop To Web – Getting It Right
Jon Trelfa Presentation From Desktop To Web – Getting It RightAjax Experience 2009
 
Douglas Crockford Presentation Goodparts
Douglas Crockford Presentation GoodpartsDouglas Crockford Presentation Goodparts
Douglas Crockford Presentation GoodpartsAjax Experience 2009
 
Douglas Crockford Presentation Jsonsaga
Douglas Crockford Presentation JsonsagaDouglas Crockford Presentation Jsonsaga
Douglas Crockford Presentation JsonsagaAjax Experience 2009
 
Brian Le Roux Presentation Introducing Phone Gap
Brian Le Roux Presentation Introducing Phone GapBrian Le Roux Presentation Introducing Phone Gap
Brian Le Roux Presentation Introducing Phone GapAjax Experience 2009
 
Ted Husted Presentation Testing The Testers Ae2009
Ted Husted Presentation Testing The Testers Ae2009Ted Husted Presentation Testing The Testers Ae2009
Ted Husted Presentation Testing The Testers Ae2009Ajax Experience 2009
 

Plus de Ajax Experience 2009 (20)

Adam Peller Interoperable Ajax Tools And Mashups
Adam Peller Interoperable Ajax Tools And MashupsAdam Peller Interoperable Ajax Tools And Mashups
Adam Peller Interoperable Ajax Tools And Mashups
 
Eric Beland Ajax Load Testing Considerations
Eric Beland Ajax Load Testing ConsiderationsEric Beland Ajax Load Testing Considerations
Eric Beland Ajax Load Testing Considerations
 
Chanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling PagecacheChanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling Pagecache
 
Jason.O Keefe.Genuitec.Presentation.Final
Jason.O Keefe.Genuitec.Presentation.FinalJason.O Keefe.Genuitec.Presentation.Final
Jason.O Keefe.Genuitec.Presentation.Final
 
Jenny Donnelly
Jenny DonnellyJenny Donnelly
Jenny Donnelly
 
Colin Clark Accessible U Is With J Query And Infusion[1]
Colin Clark Accessible U Is With J Query And Infusion[1]Colin Clark Accessible U Is With J Query And Infusion[1]
Colin Clark Accessible U Is With J Query And Infusion[1]
 
Scott Isaacs Presentationajaxexperience (Final)
Scott Isaacs Presentationajaxexperience (Final)Scott Isaacs Presentationajaxexperience (Final)
Scott Isaacs Presentationajaxexperience (Final)
 
Sergey Ilinsky Presentation Ample Sdk
Sergey Ilinsky Presentation Ample SdkSergey Ilinsky Presentation Ample Sdk
Sergey Ilinsky Presentation Ample Sdk
 
Chris Williams Presentation Dissident
Chris Williams Presentation DissidentChris Williams Presentation Dissident
Chris Williams Presentation Dissident
 
Andrew Sutherland Presentation
Andrew Sutherland PresentationAndrew Sutherland Presentation
Andrew Sutherland Presentation
 
Bill Scott Presentation
Bill Scott PresentationBill Scott Presentation
Bill Scott Presentation
 
Ted Husted Presentation Testing Ajax Applications Ae2009
Ted Husted Presentation Testing Ajax Applications Ae2009Ted Husted Presentation Testing Ajax Applications Ae2009
Ted Husted Presentation Testing Ajax Applications Ae2009
 
Ted Husted Api Doc Smackdown Ae2009
Ted Husted Api Doc Smackdown Ae2009Ted Husted Api Doc Smackdown Ae2009
Ted Husted Api Doc Smackdown Ae2009
 
Laurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationLaurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus Presentation
 
Jon Trelfa Presentation From Desktop To Web – Getting It Right
Jon Trelfa Presentation From Desktop To Web – Getting It RightJon Trelfa Presentation From Desktop To Web – Getting It Right
Jon Trelfa Presentation From Desktop To Web – Getting It Right
 
Joe Mc Cann Tae Aria Presentation
Joe Mc Cann Tae Aria PresentationJoe Mc Cann Tae Aria Presentation
Joe Mc Cann Tae Aria Presentation
 
Douglas Crockford Presentation Goodparts
Douglas Crockford Presentation GoodpartsDouglas Crockford Presentation Goodparts
Douglas Crockford Presentation Goodparts
 
Douglas Crockford Presentation Jsonsaga
Douglas Crockford Presentation JsonsagaDouglas Crockford Presentation Jsonsaga
Douglas Crockford Presentation Jsonsaga
 
Brian Le Roux Presentation Introducing Phone Gap
Brian Le Roux Presentation Introducing Phone GapBrian Le Roux Presentation Introducing Phone Gap
Brian Le Roux Presentation Introducing Phone Gap
 
Ted Husted Presentation Testing The Testers Ae2009
Ted Husted Presentation Testing The Testers Ae2009Ted Husted Presentation Testing The Testers Ae2009
Ted Husted Presentation Testing The Testers Ae2009
 

Dernier

A Spiritual Guide To Truth v10.pdf xxxxxxx
A Spiritual Guide To Truth v10.pdf xxxxxxxA Spiritual Guide To Truth v10.pdf xxxxxxx
A Spiritual Guide To Truth v10.pdf xxxxxxxssuser83613b
 
Professional Amil baba, Kala jadu specialist in Multan and Kala ilam speciali...
Professional Amil baba, Kala jadu specialist in Multan and Kala ilam speciali...Professional Amil baba, Kala jadu specialist in Multan and Kala ilam speciali...
Professional Amil baba, Kala jadu specialist in Multan and Kala ilam speciali...makhmalhalaaay
 
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...baharayali
 
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...baharayali
 
Legends of the Light v2.pdf xxxxxxxxxxxxx
Legends of the Light v2.pdf xxxxxxxxxxxxxLegends of the Light v2.pdf xxxxxxxxxxxxx
Legends of the Light v2.pdf xxxxxxxxxxxxxssuser83613b
 
Top Kala Jadu, Bangali Amil baba in Lahore and Kala jadu specialist in Lahore...
Top Kala Jadu, Bangali Amil baba in Lahore and Kala jadu specialist in Lahore...Top Kala Jadu, Bangali Amil baba in Lahore and Kala jadu specialist in Lahore...
Top Kala Jadu, Bangali Amil baba in Lahore and Kala jadu specialist in Lahore...baharayali
 
VADODARA CALL GIRL AVAILABLE 7568201473 call me
VADODARA CALL GIRL AVAILABLE 7568201473 call meVADODARA CALL GIRL AVAILABLE 7568201473 call me
VADODARA CALL GIRL AVAILABLE 7568201473 call meshivanisharma5244
 
Jude: The Acts of the Apostates (Jude vv.1-4).pptx
Jude: The Acts of the Apostates (Jude vv.1-4).pptxJude: The Acts of the Apostates (Jude vv.1-4).pptx
Jude: The Acts of the Apostates (Jude vv.1-4).pptxStephen Palm
 
Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...
Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...
Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...Amil Baba Naveed Bangali
 
VIP mohali Call Girl 7001035870 Enjoy Call Girls With Our Escorts
VIP mohali Call Girl 7001035870 Enjoy Call Girls With Our EscortsVIP mohali Call Girl 7001035870 Enjoy Call Girls With Our Escorts
VIP mohali Call Girl 7001035870 Enjoy Call Girls With Our Escortssonatiwari757
 
Elite Class ➥8448380779▻ Call Girls In Naraina Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Naraina Delhi NCRElite Class ➥8448380779▻ Call Girls In Naraina Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Naraina Delhi NCRDelhi Call girls
 
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...Amil Baba Mangal Maseeh
 
The Revelation Chapter 4 Working Copy.docx
The Revelation Chapter 4 Working Copy.docxThe Revelation Chapter 4 Working Copy.docx
The Revelation Chapter 4 Working Copy.docxFred Gosnell
 
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCRElite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCRDelhi Call girls
 
The_Chronological_Life_of_Christ_Part_99_Words_and_Works
The_Chronological_Life_of_Christ_Part_99_Words_and_WorksThe_Chronological_Life_of_Christ_Part_99_Words_and_Works
The_Chronological_Life_of_Christ_Part_99_Words_and_WorksNetwork Bible Fellowship
 
Amil baba, Kala ilam expert in Multan and Black magic specialist in Sindh and...
Amil baba, Kala ilam expert in Multan and Black magic specialist in Sindh and...Amil baba, Kala ilam expert in Multan and Black magic specialist in Sindh and...
Amil baba, Kala ilam expert in Multan and Black magic specialist in Sindh and...baharayali
 
May 2024 Calendar of Events for Hope Lutheran Church
May 2024 Calendar of Events for Hope Lutheran ChurchMay 2024 Calendar of Events for Hope Lutheran Church
May 2024 Calendar of Events for Hope Lutheran ChurchFloodwoodvern
 
Hire Best Next Js Developer For Your Project
Hire Best Next Js Developer For Your ProjectHire Best Next Js Developer For Your Project
Hire Best Next Js Developer For Your ProjectCyanic lab
 

Dernier (20)

St. Louise de Marillac and Abandoned Children
St. Louise de Marillac and Abandoned ChildrenSt. Louise de Marillac and Abandoned Children
St. Louise de Marillac and Abandoned Children
 
A Spiritual Guide To Truth v10.pdf xxxxxxx
A Spiritual Guide To Truth v10.pdf xxxxxxxA Spiritual Guide To Truth v10.pdf xxxxxxx
A Spiritual Guide To Truth v10.pdf xxxxxxx
 
Professional Amil baba, Kala jadu specialist in Multan and Kala ilam speciali...
Professional Amil baba, Kala jadu specialist in Multan and Kala ilam speciali...Professional Amil baba, Kala jadu specialist in Multan and Kala ilam speciali...
Professional Amil baba, Kala jadu specialist in Multan and Kala ilam speciali...
 
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
 
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...
 
Legends of the Light v2.pdf xxxxxxxxxxxxx
Legends of the Light v2.pdf xxxxxxxxxxxxxLegends of the Light v2.pdf xxxxxxxxxxxxx
Legends of the Light v2.pdf xxxxxxxxxxxxx
 
Top Kala Jadu, Bangali Amil baba in Lahore and Kala jadu specialist in Lahore...
Top Kala Jadu, Bangali Amil baba in Lahore and Kala jadu specialist in Lahore...Top Kala Jadu, Bangali Amil baba in Lahore and Kala jadu specialist in Lahore...
Top Kala Jadu, Bangali Amil baba in Lahore and Kala jadu specialist in Lahore...
 
VADODARA CALL GIRL AVAILABLE 7568201473 call me
VADODARA CALL GIRL AVAILABLE 7568201473 call meVADODARA CALL GIRL AVAILABLE 7568201473 call me
VADODARA CALL GIRL AVAILABLE 7568201473 call me
 
Jude: The Acts of the Apostates (Jude vv.1-4).pptx
Jude: The Acts of the Apostates (Jude vv.1-4).pptxJude: The Acts of the Apostates (Jude vv.1-4).pptx
Jude: The Acts of the Apostates (Jude vv.1-4).pptx
 
Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...
Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...
Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...
 
VIP mohali Call Girl 7001035870 Enjoy Call Girls With Our Escorts
VIP mohali Call Girl 7001035870 Enjoy Call Girls With Our EscortsVIP mohali Call Girl 7001035870 Enjoy Call Girls With Our Escorts
VIP mohali Call Girl 7001035870 Enjoy Call Girls With Our Escorts
 
Elite Class ➥8448380779▻ Call Girls In Naraina Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Naraina Delhi NCRElite Class ➥8448380779▻ Call Girls In Naraina Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Naraina Delhi NCR
 
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
 
The Revelation Chapter 4 Working Copy.docx
The Revelation Chapter 4 Working Copy.docxThe Revelation Chapter 4 Working Copy.docx
The Revelation Chapter 4 Working Copy.docx
 
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCRElite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCR
 
The_Chronological_Life_of_Christ_Part_99_Words_and_Works
The_Chronological_Life_of_Christ_Part_99_Words_and_WorksThe_Chronological_Life_of_Christ_Part_99_Words_and_Works
The_Chronological_Life_of_Christ_Part_99_Words_and_Works
 
Amil baba, Kala ilam expert in Multan and Black magic specialist in Sindh and...
Amil baba, Kala ilam expert in Multan and Black magic specialist in Sindh and...Amil baba, Kala ilam expert in Multan and Black magic specialist in Sindh and...
Amil baba, Kala ilam expert in Multan and Black magic specialist in Sindh and...
 
May 2024 Calendar of Events for Hope Lutheran Church
May 2024 Calendar of Events for Hope Lutheran ChurchMay 2024 Calendar of Events for Hope Lutheran Church
May 2024 Calendar of Events for Hope Lutheran Church
 
Zulu - The Epistle of Ignatius to Polycarp.pdf
Zulu - The Epistle of Ignatius to Polycarp.pdfZulu - The Epistle of Ignatius to Polycarp.pdf
Zulu - The Epistle of Ignatius to Polycarp.pdf
 
Hire Best Next Js Developer For Your Project
Hire Best Next Js Developer For Your ProjectHire Best Next Js Developer For Your Project
Hire Best Next Js Developer For Your Project
 

David Wei And Changhao Jiang Presentation

  • 1.
  • 2. Adaptive Static Resource Optimization AJAXian Conference 2009 Sep 15, 2009 Boston, MA David Wei and ChanghaoJiang
  • 4. Optimization has to be adaptive!
  • 5.
  • 7.
  • 8. Why we need adaptive packaging? Day 2: Some smart engineers run YSlow and thinks… <Print css tag for feature A> <Print css tag for feature B> <Print css tag for feature C> <print HTML of feature A> <print HTML of feature B> <print HTML of feature C> … “A & B & C are always used; let’s package them together!”
  • 9. Why we need adaptive packaging? Day 2: Awesome! <Print css tag for feature A&B&C> <print HTML of feature A> <print HTML of feature B> <print HTML of feature C> …
  • 10. Why we need adaptive packaging? Day 3: feature C evolves… <Print css tag for feature A & B & C> <print HTML of feature A> <print HTML of feature B> If (users_signup_for_C()) { <print HTML of feature C>} …
  • 11. Why we need adaptive packaging? Day 3: <Print css tag for feature A & B & C> <print HTML of feature A> <print HTML of feature B> If (users_signup_for_C()) { <print HTML of feature C>} … A&B are always used, while C is not. ..
  • 12. Why we need adaptive packaging? Day 4: feature C is deprecated <Print css tag for feature A & B & C> <print HTML of feature A> <print HTML of feature B> // no one uses C { <print HTML of feature C>} …
  • 13. Why we need adaptive packaging? Day 4: we start to send unused bits <Print css tag for feature A & B & C> <print HTML of feature A> <print HTML of feature B> // no one uses C { <print HTML of feature C>} … It is hard to remember we should remove C here.
  • 14. Why we need adaptive packaging? One months later… <Print css tag for feature A & B & C & D & E & F & G…> if (F is used) <print HTML of feature F> <print HTML of feature G> if (F is not used) { <print HTML of feature E>} … Thousands of dead CSS rules in the package.
  • 15.
  • 17.
  • 18. Requirement declaration: lives with HTML generation
  • 19.
  • 20. Static Resource Management Separate Declaration from actual Delivery Back to Day 1: require_static(A_css); <render HTML of feature A> require_static(B_css); <render HTML of feature B> require_static(C_css);<render HTML of feature C> <deliver all required CSS> <print all rendered HTML> Requirement Declaration lives with HTML Global Optimization on Delivery
  • 21. Offline analysis Packager: Global JS/CSS Optimization Online process require_static(A_css); <render HTML of feature A> require_static(B_css); <render HTML of feature B> require_static(C_css); <render HTML of feature C> <deliver all required CSS> <print all rendered HTML> Usage Pattern logs Packaging algorithm “Optimal” packages
  • 22. Packager: models Cost/Benefit tradeoff model: To package two CSS/JS files A & B: Cost: for page requests that only uses A, we waste the bytes of B (bandwidth) Benefit: for page requests that uses both A and B: we save one round trip (latency ) Maximize “Profit” (Benefit – Cost) Future: Users with different network connections have different packaging solutions Usage Pattern logs Packaging algorithm “Optimal” packages
  • 23. Packager: models Potential extensions (and trade-offs): Consider all resources used in user browsing sessions, instead of user page loads first page slower, subsequent pages faster Consider cache probability: new files change more New user slower, old users faster Consider other costs: CSS rules JS executions HTTP header overheads Usage Pattern logs Packaging algorithm “Optimal” packages
  • 24. Packager: algorithm A classic optimization problem: Algorithms: Greedy algorithm Simulated Annealing Clustering algorithms Trade-off between offline computation cost and accuracy: Greedy is good enough for us Usage Pattern logs Packaging algorithm “Optimal” packages
  • 25.
  • 26. Progressive rendering for common JS/CSS/Images
  • 27.
  • 28.
  • 29. Javascript and CSS packaging only (image soon)
  • 30.
  • 31.
  • 34.
  • 35.
  • 36. Human errors are unavoidable Automatic analysis is preferable: require_static(A_css); //forgot to remove the require_static require_static(B_css); <render HTML of feature B> require_static(C_css); <render HTML of feature C> <deliver all required CSS> <print all rendered HTML>
  • 37.
  • 38.

Notes de l'éditeur

  1. Deep integration: Each facebook home page is customized for a particular user, with features developed by many teams– some of them are applications by 3rd party developers, some of them are internal facebook feature – depending on the users’ adoption on the features and applications.Viral Adoption: we don’t know what will be the most popular Facebook feature tomorrowAgile development: our codebase change by hours, released weekly
  2. Deep Integration: each page has many features;Viral adoption: usage pattern changes quicklyAgile development: feature changes fast
  3. Current Assumptions: bandwidth = 1Mbps and latency = 40ms
  4. First thing first: site speed matters.
  5. The # of JS files are increased by 60%, the byte sites are increased by 30%. The # of pkg sent is halved, the byte size is 10% less.find | grep -v .svn | grep -v intern | grep .css$ -cfind | grep -v .svn | grep -v intern | grep .css$ | xargs cat > /tmp/dwei_2008
  6. Developers think that timeeditor.js is a library file – in fact, it is only used in a single production page (career)On the other hand, it turns out that “resume“ function is almost always used in career page, too.
  7. CSS is a similar story
  8. The same trace-base analysis techniques can be use in image spriting too:
  9. The answer is…In retrospection, this is pretty straight forward.
  10. [devrs007] images > find | grep -vsvn -c3407