SlideShare a Scribd company logo
1 of 41
Download to read offline
Front-end Performance
Kornel Lesi!ski
London Web Standards 2010
Why front-end?

Every site has one
Same technologies everywhere
Page generation time—milliseconds
JavaScript execution time—milliseconds
Page loading time—seconds
Why performance?
Google/Bing speed test

Delays under half a second impact business metrics
The cost of delay increases over time and persists
Number of bytes in response is less important than
what they are and when they are sent
Use progressive rendering
Factor in Google ranking (affects 1%)
 Grain of salt needed for Webmaster Tools page speed
 and "Let's make web faster" site
Nielsen’s
response time limits

 100ms feels instantaneous
 1s keeps flow uninterrupted
 10s is the limit (especially without feedback)
Enemy #1: Latency
Latency


Since modems bandwidth improved 300 times
Latency improved 3 times
Latency isn't going away
HTTP & TCP/IP latency
Three-way handshake: SYN, SYN-ACK, ACK
2 ping times to download anything
Pipelining unreliable
Slow start = unused bandwidth
HTTPS is much much worse
Reduce number of requests
Reduce number of requests
Merge all JavaScript files into one

  don’t forget to put newlines between files

Merge all CSS files into one

  don’t use @import!            Bu
                                     tn
                                       ot
  use @media print                          in P
                                                HP
                                                  !
                  Auto mate this
CSS sprites
Merge many small images into one
Use background-position
Good for hover effects



                            Not clipboard-friendly
                            Avoid huge bitmaps
                            Maintenance pain
Parallelise!

 IE7 has 2 connections limit per hostname (not server)
 That's what RFC2616 suggests
 Use cookie-less assets sever (CDN)
 Serve CSS from same host as HTML
Cache forever
mod_expires
!"#$%&'()*)#&+$,-.&/#0.+1023+#45'+6+)&-%7

Change URL when content changes
'8)4&9:6;<=>?''

Verify cacheability
  Mnot's cacheability engine redbot.org
  Webkit's audit
  web-sniffer.net
Scripts
@2?5,&08>3%$8& is evil
Scripts are black box. Can affect rest of the document:

 A'?%$#8B
 ++@2?5,&08>3%$8&C1AD997EF
 A/'?%$#8B
 A'?%$#8+'%?G1H227BA/'?%$#8B
 99B
@2?5,&08>3%$8& is evil

Makes parser wait for scripts
WebKit, Firefox and IE8 parse page twice
IE7 and Opera don't!
There’s no hope for scripts that write scripts
@2?5,&08>3%$8&C1A'?%$#8+'%?GI@$'-'8&%JK
Scripts must be at end of body

         A'?%$#8+'%?B


           A/L2@)B
:-%+N@&H&%%&@F
H50?8$20+@&H&%CHE+M
++:-%+&GN@&H&%%&@F
++N@&H&%%&@G&PH50?8$20CEM&CEFHCEOQH
O
                  …
@&H&%CH50?8$20CEM
++@2N'85HHCEF
OEF
                 …
@&H&%GH50?8$20CHEM'&8*$,&258CHR6EO+
@&H&%CN@&H&%%&@EF+
N@&H&%%&@G0544F
Waiting for ad.doubleclick.net…




                         Ads
Ads
Place at very end of document
and use #2'$8$20Q-L'2458&




Use $H%-,& otherwise

SWFObject is great
Remember embeds and buttons are same thing
Don't use @&H&% attribute

 Few browsers support except IE
 Poor support in IE too
 Quirky and not really asynchronous
 @2?5,&08>3%$8& won't work anyway

 -')0? is better, but beware of race conditions
Hosted libraries don't help

 Few users have same version cached
 Extra penalty if they don't
 Caches are not as persistent as you think
 You’ll need your own scripts file anyway
Waterfall
Waterfall
Waterfall

                   Bad




            Good
Waterfall
 IE7 and Opera differ from everything else
 www.webpagetest.org
 Fiddler
   Enable "streaming mode"!
 WebKit inspector
 Firebug
YSlow   Google PageSpeed
Progressive rendering
               friend or foe?
Makes slow pages faster
Makes fast pages slower
Rendering delay: load under 2s for greatness
Specify image dimensions
Specify float widths
Avoid clearing divs or brs!   Lorem ipsum. This is subliminal message. You
                              love this presentation. Kornel is the best. Lorem
                              ipsum dolor sit amet, consectetur adipisicing elit,
                              sed do eiusmod tempor incididunt ut labore et

Use overflow:hidden
                              dolore magna aliqua. Ut enim ad minim veniam,
                              quis nostrud exercitation ullamco laboris nisi ut
                              aliquip ex ea commodo consequat. Duis aute irure
                              dolor in reprehenderit in voluptate velit esse cillum
                              dolore eu fugiat nulla pariatur. Excepteur sint

Use clearfix where             occaecat cupidatat non proident, sunt in culpa qui
                              officia deserunt mollit anim id est laborum.
                              Lorem ipsum. This is subliminal message. You
                              love this presentation. Kornel is the best. Lorem


overflow can't be used
                              ipsum dolor sit amet, consectetur adipisicing elit,
                              sed do eiusmod tempor incididunt ut labore et
                              dolore magna aliqua.
                              Ut enim ad minim veniam, quis nostrud
                              exercitation ullamco laboris nisi ut aliquip ex ea
                              commodo consequat. Duis aute irure dolor in
                              reprehenderit in voluptate velit esse cillum dolore
                              eu fugiat nulla pariatur.
                              Excepteur sint occaecat cupidatat non proident,
                              sunt in culpa qui officia deserunt mollit anim id est
                              laborum. Lorem ipsum. This is subliminal
                              message. You love this presentation. Kornel is the
                              best. Lorem ipsum dolor sit amet, consectetur
                              adipisicing elit, sed do eiusmod tempor incididunt
                              ut labore et dolore magna aliqua. Ut enim ad
                              minim veniam, quis nostrud exercitation ullamco
                              laboris nisi ut aliquip ex ea commodo consequat.
                              Duis aute irure dolor in reprehenderit in voluptate
                              velit esse cillum dolore eu fugiat nulla pariatur.
                              Excepteur sint occaecat cupidatat non proident,
                              sunt in culpa qui officia deserunt mollit anim id est
                              laborum.



                                 AL%+?4&-%G-44B
Avoid clearing divs or brs!   Lorem ipsum. This is subliminal message. You
                              love this presentation. Kornel is the best. Lorem
                              ipsum dolor sit amet, consectetur adipisicing elit,
                              sed do eiusmod tempor incididunt ut labore et

Use overflow:hidden
                              dolore magna aliqua. Ut enim ad minim veniam,
                              quis nostrud exercitation ullamco laboris nisi ut
                              aliquip ex ea commodo consequat. Duis aute irure
                              dolor in reprehenderit in voluptate velit esse cillum
                              dolore eu fugiat nulla pariatur. Excepteur sint

Use clearfix where             occaecat cupidatat non proident, sunt in culpa qui
                              officia deserunt mollit anim id est laborum.
                              Lorem ipsum. This is subliminal message. You
                              love this presentation. Kornel is the best. Lorem


overflow can't be used
                              ipsum dolor sit amet, consectetur adipisicing elit,
                              sed do eiusmod tempor incididunt ut labore et
                              dolore magna aliqua.
                              Ut enim ad minim veniam, quis nostrud
                              exercitation ullamco laboris nisi ut aliquip ex ea
                              commodo consequat. Duis aute irure dolor in
                              reprehenderit in voluptate velit esse cillum dolore
                              eu fugiat nulla pariatur.
                              Excepteur sint occaecat cupidatat non proident,
                              sunt in culpa qui officia deserunt mollit anim id est
                              …




                                 !"#$%&'(#)(&&*
Bandwidth
Gzip, gzip, gzip

 HTML, CSS, JS—everything text-based >50% savings
 Very fast, faster than network
 mod_deflate/mod_compress
 PHP filter
 Automatically negotiated
Minify

 10-15% users might not ask for gzip (lousy proxies,
 antivirs, corporate firewalls)
 Makes gzipped files even smaller
 YUI Compressor for CSS and JS
 Google Closure Compiler advanced optimisations
 Makefile is a good idea
Image reduction

Lowest number of colours
Don't use PNG24. If you do, try posterize
Use PNG8+alpha (Photoshop sucks. Fireworks rocks)
Don't use GIF
JPEG likes blur and 8x8 boundaries
ImageAlpha
pornel.net/imagealpha
Image optimisation

Remove unused data: comments, EXIF metadata,
colour profiles (use sRGB with gamma 2.2)
Find optimal compression strategy (gzip levels and
methods, PNG filters)
No loss in quality
ImageOptim
imageoptim.pornel.net

More Related Content

Viewers also liked

Symptoms of a Billing and Payment Problem
Symptoms of a Billing and Payment ProblemSymptoms of a Billing and Payment Problem
Symptoms of a Billing and Payment ProblemMulti Service
 
Living Comenius_my week in Paris by Eddy
Living Comenius_my week in Paris by EddyLiving Comenius_my week in Paris by Eddy
Living Comenius_my week in Paris by Eddybarbelkarlsruhe
 
BITTERROOT CONSPIRACY "THE FUND" WFC HOLDINGS Corp dba Wells Fargo & Co/MN -N...
BITTERROOT CONSPIRACY "THE FUND" WFC HOLDINGS Corp dba Wells Fargo & Co/MN -N...BITTERROOT CONSPIRACY "THE FUND" WFC HOLDINGS Corp dba Wells Fargo & Co/MN -N...
BITTERROOT CONSPIRACY "THE FUND" WFC HOLDINGS Corp dba Wells Fargo & Co/MN -N...Nancy Drewe Alias
 
Proposed New US fashion design law 2010
Proposed New US fashion design law 2010Proposed New US fashion design law 2010
Proposed New US fashion design law 2010Darrell Mottley
 
Feast of saint martin celebrated in santarcangelo by cassoli alberto 3 d
Feast of saint martin  celebrated in santarcangelo by cassoli alberto 3 dFeast of saint martin  celebrated in santarcangelo by cassoli alberto 3 d
Feast of saint martin celebrated in santarcangelo by cassoli alberto 3 dbarbelkarlsruhe
 
Sorrento Scenario - Summer 2011 newsletter
Sorrento Scenario - Summer 2011 newsletterSorrento Scenario - Summer 2011 newsletter
Sorrento Scenario - Summer 2011 newsletterSorrento Centre
 
Let's Get It Started - Business Documentation
Let's Get It Started - Business DocumentationLet's Get It Started - Business Documentation
Let's Get It Started - Business DocumentationDavis Law Office
 
Himneyo intro
Himneyo introHimneyo intro
Himneyo introTaeho Kim
 

Viewers also liked (10)

Symptoms of a Billing and Payment Problem
Symptoms of a Billing and Payment ProblemSymptoms of a Billing and Payment Problem
Symptoms of a Billing and Payment Problem
 
Living Comenius_my week in Paris by Eddy
Living Comenius_my week in Paris by EddyLiving Comenius_my week in Paris by Eddy
Living Comenius_my week in Paris by Eddy
 
Global
GlobalGlobal
Global
 
BITTERROOT CONSPIRACY "THE FUND" WFC HOLDINGS Corp dba Wells Fargo & Co/MN -N...
BITTERROOT CONSPIRACY "THE FUND" WFC HOLDINGS Corp dba Wells Fargo & Co/MN -N...BITTERROOT CONSPIRACY "THE FUND" WFC HOLDINGS Corp dba Wells Fargo & Co/MN -N...
BITTERROOT CONSPIRACY "THE FUND" WFC HOLDINGS Corp dba Wells Fargo & Co/MN -N...
 
Proposed New US fashion design law 2010
Proposed New US fashion design law 2010Proposed New US fashion design law 2010
Proposed New US fashion design law 2010
 
Feast of saint martin celebrated in santarcangelo by cassoli alberto 3 d
Feast of saint martin  celebrated in santarcangelo by cassoli alberto 3 dFeast of saint martin  celebrated in santarcangelo by cassoli alberto 3 d
Feast of saint martin celebrated in santarcangelo by cassoli alberto 3 d
 
Sorrento Scenario - Summer 2011 newsletter
Sorrento Scenario - Summer 2011 newsletterSorrento Scenario - Summer 2011 newsletter
Sorrento Scenario - Summer 2011 newsletter
 
Let's Get It Started - Business Documentation
Let's Get It Started - Business DocumentationLet's Get It Started - Business Documentation
Let's Get It Started - Business Documentation
 
Presenation-eng
Presenation-engPresenation-eng
Presenation-eng
 
Himneyo intro
Himneyo introHimneyo intro
Himneyo intro
 

Similar to Front-End Performance

Specifying line-clamp
Specifying line-clampSpecifying line-clamp
Specifying line-clampIgalia
 
20 Copywriting Disasters (and how to avoid them)
20 Copywriting Disasters (and how to avoid them)20 Copywriting Disasters (and how to avoid them)
20 Copywriting Disasters (and how to avoid them)Ian Lurie
 
EVO Energy Consulting Brand Development
EVO Energy Consulting Brand DevelopmentEVO Energy Consulting Brand Development
EVO Energy Consulting Brand DevelopmentRandy Stuart
 
3 Macro Tech Trends for the Events Industry
3 Macro Tech Trends for the Events Industry3 Macro Tech Trends for the Events Industry
3 Macro Tech Trends for the Events IndustryMitch Colleran
 
Tech Tools: The New Ecosystem of Events
Tech Tools: The New Ecosystem of EventsTech Tools: The New Ecosystem of Events
Tech Tools: The New Ecosystem of EventsEventbrite
 
10 chart and slide design tips for better reports
10 chart and slide design tips for better reports10 chart and slide design tips for better reports
10 chart and slide design tips for better reportsMichel Guillet
 
Dear compiler please don't be my nanny v2
Dear compiler  please don't be my nanny v2Dear compiler  please don't be my nanny v2
Dear compiler please don't be my nanny v2Dino Dini
 
Concept Keynote Template (MAC) - Presentation
Concept Keynote Template (MAC) - PresentationConcept Keynote Template (MAC) - Presentation
Concept Keynote Template (MAC) - PresentationTalhaPolat
 
Making the Transition from Print to Digital Design

Making the Transition from Print to Digital Design
Making the Transition from Print to Digital Design

Making the Transition from Print to Digital Design
Tim Frick
 
2019-11 NewOpsDays Dallas - Sysadmin to SRE _v1.1
2019-11 NewOpsDays Dallas  - Sysadmin to SRE _v1.12019-11 NewOpsDays Dallas  - Sysadmin to SRE _v1.1
2019-11 NewOpsDays Dallas - Sysadmin to SRE _v1.1Jorn Knuttila
 
Eric Cleaver White Design / KMS Celebration Preso
Eric Cleaver White Design / KMS Celebration PresoEric Cleaver White Design / KMS Celebration Preso
Eric Cleaver White Design / KMS Celebration PresoEric White
 
ProJet x60 Color-Jet Printer Best Practices (AMUG 2016)
ProJet x60 Color-Jet Printer Best Practices (AMUG 2016)ProJet x60 Color-Jet Printer Best Practices (AMUG 2016)
ProJet x60 Color-Jet Printer Best Practices (AMUG 2016)John T. Lee
 
Delivering Unbundled Legal Services Over the Internet
Delivering Unbundled Legal Services Over the InternetDelivering Unbundled Legal Services Over the Internet
Delivering Unbundled Legal Services Over the InternetStephanie Kimbro Dolin
 
Agile Software Development for Non-Developers
Agile Software Development for Non-DevelopersAgile Software Development for Non-Developers
Agile Software Development for Non-Developershamvocke
 
Applying Chaos Engineering to Build Resilient Serverless Applications
Applying Chaos Engineering to Build Resilient Serverless Applications Applying Chaos Engineering to Build Resilient Serverless Applications
Applying Chaos Engineering to Build Resilient Serverless Applications Emrah Samdan
 
Keynote training 2011
Keynote training 2011Keynote training 2011
Keynote training 2011Doug Evans
 
PowerPoint - Mastering The Art
PowerPoint - Mastering The ArtPowerPoint - Mastering The Art
PowerPoint - Mastering The ArtAshutosh Rungta
 
How to Create a Virtual Law Practice
How to Create a Virtual Law PracticeHow to Create a Virtual Law Practice
How to Create a Virtual Law PracticeRichard S. Granat
 

Similar to Front-End Performance (20)

Web design for beginners
Web design for beginnersWeb design for beginners
Web design for beginners
 
Specifying line-clamp
Specifying line-clampSpecifying line-clamp
Specifying line-clamp
 
20 Copywriting Disasters (and how to avoid them)
20 Copywriting Disasters (and how to avoid them)20 Copywriting Disasters (and how to avoid them)
20 Copywriting Disasters (and how to avoid them)
 
EVO Energy Consulting Brand Development
EVO Energy Consulting Brand DevelopmentEVO Energy Consulting Brand Development
EVO Energy Consulting Brand Development
 
3 Macro Tech Trends for the Events Industry
3 Macro Tech Trends for the Events Industry3 Macro Tech Trends for the Events Industry
3 Macro Tech Trends for the Events Industry
 
Tech Tools: The New Ecosystem of Events
Tech Tools: The New Ecosystem of EventsTech Tools: The New Ecosystem of Events
Tech Tools: The New Ecosystem of Events
 
10 chart and slide design tips for better reports
10 chart and slide design tips for better reports10 chart and slide design tips for better reports
10 chart and slide design tips for better reports
 
Dear compiler please don't be my nanny v2
Dear compiler  please don't be my nanny v2Dear compiler  please don't be my nanny v2
Dear compiler please don't be my nanny v2
 
Concept Keynote Template (MAC) - Presentation
Concept Keynote Template (MAC) - PresentationConcept Keynote Template (MAC) - Presentation
Concept Keynote Template (MAC) - Presentation
 
Making the Transition from Print to Digital Design

Making the Transition from Print to Digital Design
Making the Transition from Print to Digital Design

Making the Transition from Print to Digital Design

 
2019-11 NewOpsDays Dallas - Sysadmin to SRE _v1.1
2019-11 NewOpsDays Dallas  - Sysadmin to SRE _v1.12019-11 NewOpsDays Dallas  - Sysadmin to SRE _v1.1
2019-11 NewOpsDays Dallas - Sysadmin to SRE _v1.1
 
Eric Cleaver White Design / KMS Celebration Preso
Eric Cleaver White Design / KMS Celebration PresoEric Cleaver White Design / KMS Celebration Preso
Eric Cleaver White Design / KMS Celebration Preso
 
Vaadin 7 what next
Vaadin 7   what nextVaadin 7   what next
Vaadin 7 what next
 
ProJet x60 Color-Jet Printer Best Practices (AMUG 2016)
ProJet x60 Color-Jet Printer Best Practices (AMUG 2016)ProJet x60 Color-Jet Printer Best Practices (AMUG 2016)
ProJet x60 Color-Jet Printer Best Practices (AMUG 2016)
 
Delivering Unbundled Legal Services Over the Internet
Delivering Unbundled Legal Services Over the InternetDelivering Unbundled Legal Services Over the Internet
Delivering Unbundled Legal Services Over the Internet
 
Agile Software Development for Non-Developers
Agile Software Development for Non-DevelopersAgile Software Development for Non-Developers
Agile Software Development for Non-Developers
 
Applying Chaos Engineering to Build Resilient Serverless Applications
Applying Chaos Engineering to Build Resilient Serverless Applications Applying Chaos Engineering to Build Resilient Serverless Applications
Applying Chaos Engineering to Build Resilient Serverless Applications
 
Keynote training 2011
Keynote training 2011Keynote training 2011
Keynote training 2011
 
PowerPoint - Mastering The Art
PowerPoint - Mastering The ArtPowerPoint - Mastering The Art
PowerPoint - Mastering The Art
 
How to Create a Virtual Law Practice
How to Create a Virtual Law PracticeHow to Create a Virtual Law Practice
How to Create a Virtual Law Practice
 

Recently uploaded

2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 

Recently uploaded (20)

2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 

Front-End Performance

  • 2. Why front-end? Every site has one Same technologies everywhere Page generation time—milliseconds JavaScript execution time—milliseconds Page loading time—seconds
  • 4. Google/Bing speed test Delays under half a second impact business metrics The cost of delay increases over time and persists Number of bytes in response is less important than what they are and when they are sent Use progressive rendering
  • 5. Factor in Google ranking (affects 1%) Grain of salt needed for Webmaster Tools page speed and "Let's make web faster" site
  • 6. Nielsen’s response time limits 100ms feels instantaneous 1s keeps flow uninterrupted 10s is the limit (especially without feedback)
  • 8.
  • 9.
  • 10. Latency Since modems bandwidth improved 300 times Latency improved 3 times Latency isn't going away
  • 11. HTTP & TCP/IP latency Three-way handshake: SYN, SYN-ACK, ACK 2 ping times to download anything Pipelining unreliable Slow start = unused bandwidth HTTPS is much much worse Reduce number of requests
  • 12. Reduce number of requests
  • 13. Merge all JavaScript files into one don’t forget to put newlines between files Merge all CSS files into one don’t use @import! Bu tn ot use @media print in P HP ! Auto mate this
  • 14. CSS sprites Merge many small images into one Use background-position Good for hover effects Not clipboard-friendly Avoid huge bitmaps Maintenance pain
  • 15. Parallelise! IE7 has 2 connections limit per hostname (not server) That's what RFC2616 suggests Use cookie-less assets sever (CDN) Serve CSS from same host as HTML
  • 16. Cache forever mod_expires !"#$%&'()*)#&+$,-.&/#0.+1023+#45'+6+)&-%7 Change URL when content changes '8)4&9:6;<=>?'' Verify cacheability Mnot's cacheability engine redbot.org Webkit's audit web-sniffer.net
  • 18. @2?5,&08>3%$8& is evil Scripts are black box. Can affect rest of the document: A'?%$#8B ++@2?5,&08>3%$8&C1AD997EF A/'?%$#8B A'?%$#8+'%?G1H227BA/'?%$#8B 99B
  • 19. @2?5,&08>3%$8& is evil Makes parser wait for scripts WebKit, Firefox and IE8 parse page twice IE7 and Opera don't! There’s no hope for scripts that write scripts @2?5,&08>3%$8&C1A'?%$#8+'%?GI@$'-'8&%JK
  • 20. Scripts must be at end of body A'?%$#8+'%?B A/L2@)B
  • 21. :-%+N@&H&%%&@F H50?8$20+@&H&%CHE+M ++:-%+&GN@&H&%%&@F ++N@&H&%%&@G&PH50?8$20CEM&CEFHCEOQH O … @&H&%CH50?8$20CEM ++@2N'85HHCEF OEF … @&H&%GH50?8$20CHEM'&8*$,&258CHR6EO+ @&H&%CN@&H&%%&@EF+ N@&H&%%&@G0544F
  • 23. Ads Place at very end of document and use #2'$8$20Q-L'2458& Use $H%-,& otherwise SWFObject is great Remember embeds and buttons are same thing
  • 24. Don't use @&H&% attribute Few browsers support except IE Poor support in IE too Quirky and not really asynchronous @2?5,&08>3%$8& won't work anyway -')0? is better, but beware of race conditions
  • 25. Hosted libraries don't help Few users have same version cached Extra penalty if they don't Caches are not as persistent as you think You’ll need your own scripts file anyway
  • 28. Waterfall Bad Good
  • 29. Waterfall IE7 and Opera differ from everything else www.webpagetest.org Fiddler Enable "streaming mode"! WebKit inspector Firebug
  • 30. YSlow Google PageSpeed
  • 31. Progressive rendering friend or foe?
  • 32. Makes slow pages faster Makes fast pages slower Rendering delay: load under 2s for greatness Specify image dimensions Specify float widths
  • 33. Avoid clearing divs or brs! Lorem ipsum. This is subliminal message. You love this presentation. Kornel is the best. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et Use overflow:hidden dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint Use clearfix where occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum. This is subliminal message. You love this presentation. Kornel is the best. Lorem overflow can't be used ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum. This is subliminal message. You love this presentation. Kornel is the best. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. AL%+?4&-%G-44B
  • 34. Avoid clearing divs or brs! Lorem ipsum. This is subliminal message. You love this presentation. Kornel is the best. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et Use overflow:hidden dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint Use clearfix where occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum. This is subliminal message. You love this presentation. Kornel is the best. Lorem overflow can't be used ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est … !"#$%&'(#)(&&*
  • 36. Gzip, gzip, gzip HTML, CSS, JS—everything text-based >50% savings Very fast, faster than network mod_deflate/mod_compress PHP filter Automatically negotiated
  • 37. Minify 10-15% users might not ask for gzip (lousy proxies, antivirs, corporate firewalls) Makes gzipped files even smaller YUI Compressor for CSS and JS Google Closure Compiler advanced optimisations Makefile is a good idea
  • 38. Image reduction Lowest number of colours Don't use PNG24. If you do, try posterize Use PNG8+alpha (Photoshop sucks. Fireworks rocks) Don't use GIF JPEG likes blur and 8x8 boundaries
  • 40. Image optimisation Remove unused data: comments, EXIF metadata, colour profiles (use sRGB with gamma 2.2) Find optimal compression strategy (gzip levels and methods, PNG filters) No loss in quality