SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 1
High Performance Mobile Web
James D Bloom
http://blog.jamesdbloom.com
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 2
This talk….
§  Why We Should Care About Performance?
§  Network
–  Reducing Requests
–  Reducing Bytes
–  Increasing Bandwidth Efficiency
§  Software
–  Increasing Parallelism
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 3
WHY
- WE SHOULD CARE ABOUT PERFORMANCE?01
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 4
-2.2s
+15% downloads
Firefox
0.4 -> 0.9s
-25% searches
Google
-5s
+12% revenue
-50% hardware
Shopzilla
each -100ms
+1% revenue
Wallmart & Amazon
Premature optimization is the root of all evil (or at least most of it) in programming.
– Donald Knuth
+1s
-4% revenue
Bing
But…
40% abandon
if >3s
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 5
NETWORK
- REDUCING REQUESTS
- REDUCING BYTES
- INCREASING BANDWIDTH EFFICIENCY
02
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 6
CORELATION TO LOAD TIME
Total
Requests
Image
Requests
Total Xfer
Size
Image Xfer
Size
Domains
TOTAL REQUESTS 0.46
IMAGE REQUESTS 0.44
TOTAL XFER SIZE 0.40
IMAGE XFER SIZE 0.37
Reduce
Requests
DOMAINS 0.37
http://mobile.httparchive.org/ Based on: Alexa Top 1,000,000 Sites
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 7
COMBINE REQUESTS - BUNDLING
§  JavaScript Bundle
–  Combine all files into single bundle
§  CSS Bundle
–  Combine all files into single bundle
§  Image Sprite
–  Combine all images into CSS Sprite
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 8
COMBINE REQUESTS - INLINING
§  Inlining
–  dataURI for external resources
–  Base64 larger by 8/6
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 9
COMBINE REQUESTS - INLINING
§  First	
  Load:	
  
–  inline	
  resources	
  and	
  set	
  cookie	
  
–  put	
  resources	
  in	
  localStorage	
  and	
  update	
  cookie	
  
§  Subsequent	
  Load:	
  
–  check	
  cookie	
  
•  if	
  updated	
  
–  load	
  resources	
  from	
  localStorage	
  (at	
  top	
  of	
  page)	
  
•  if	
  ini>al	
  value	
  -­‐>	
  no	
  JavaScript	
  or	
  localStorage	
  
–  return	
  with	
  resources	
  as	
  external	
  links	
  
§  Bing	
  
–  1st	
  request	
  54.9	
  KB	
  
–  2nd	
  request	
  5.5	
  KB	
  
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 10
NETWORK
- REDUCING REQUESTS
- REDUCING BYTES
- INCREASING BANDWIDTH EFFICIENCY
02
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 11
RESPONSE SIZE (in kB)
358
112
33 23
10
Images Scripts HTML Stylesheets Other
IMAGES 67%
SCRIPTS 21%
HTML 6%
STYLESHEETS 4%
OTHER 2%
Reduce
Image Size
http://mobile.httparchive.org/ Based on: Alexa Top 1,000,000 Sites
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 12
REDUCING BYTES – ADAPTIVE RESOURCES
§  Adaptive Images
–  UA sniffing or media queries
–  Major breakpoints or server side scaling
§  Adaptive JavaScript
–  UA sniffing for device specific JS
§  Adaptive CSS
–  Media queries for device specific CSS
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 13
REDUCING BYTES - MINIFY
§  Minify JS & CSS
–  Typically during bundling
§  Mini JS framework
–  don’t send desktop JS to mobile
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 14
REDUCING BYTES
§  Compression
–  Use gzip for text resources
–  Maximize lossless compression for images
§  Reduce Upload
–  Reduce / remove cookies
–  Server-side cookie
–  Cookie Free Domain
•  static resources
•  CDN
§  HIJAX
–  Highjack full page request
–  AJAX to replace <body/>
–  Avoids reloading CSS, JS, background images
§  Images
–  Avoid animated gifs
•  static image + JS
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 15
NETWORK
- REDUCING REQUESTS
- REDUCING BYTES
- INCREASING BANDWIDTH EFFICIENCY
02
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 16
PARALLELIZE DOWNLOADS
§  CSS at the top
–  download background images
–  avoid FOUC
§  JS at the bottom
–  avoid SPOF
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 17
PARALLELIZE DOWNLOADS
§  Domain Sharding
–  > 6 resources due to extra domain lookups
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 18
DELAYING DOWNLOAD
§  delay load with document.appendChild(node)
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 19
EARLY DOWNLOAD
§  Eager loading
–  Load static pages eagerly
–  Store in localStorage
–  Uses spare bandwidth
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 20
SOFTWARE
- INCREASING PARALLELISM03
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 21
PARALLEL SERVICE CALLS
render view
build model
service & DB calls
flush <head/>
controller task executor
view
flush <body/>
§  Parallelize service calls / DB queries
§  Render view (and flush <head/>) in parallel
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 22
PARALLEL DOWNLOAD
§  Flush <head/> early
–  CSS in parallel
–  CSS background images (sprites) in parallel
© Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 23
Questions….

Weitere ähnliche Inhalte

Was ist angesagt?

Quantifying The Mobile Difference
Quantifying The Mobile DifferenceQuantifying The Mobile Difference
Quantifying The Mobile DifferenceGuy Podjarny
 
Jon Arne Sæterås - Give Responsive Design a mobile performance boost
Jon Arne Sæterås - Give Responsive Design a mobile performance boost Jon Arne Sæterås - Give Responsive Design a mobile performance boost
Jon Arne Sæterås - Give Responsive Design a mobile performance boost DevConFu
 
10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamai
10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamai10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamai
10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamaielenae00
 
Raiders of the Fast Start: Frontend Performance Archaeology - Performance.now...
Raiders of the Fast Start: Frontend Performance Archaeology - Performance.now...Raiders of the Fast Start: Frontend Performance Archaeology - Performance.now...
Raiders of the Fast Start: Frontend Performance Archaeology - Performance.now...Katie Sylor-Miller
 
Image-ine That: Image Optimization for Conversion Maximization
Image-ine That: Image Optimization for Conversion MaximizationImage-ine That: Image Optimization for Conversion Maximization
Image-ine That: Image Optimization for Conversion MaximizationYottaa
 
Extreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NYExtreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NYMaximiliano Firtman
 
Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...
Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...
Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...Jay Hung
 
Performance Implications of Mobile Design (Perf Audience Edition)
Performance Implications of Mobile Design (Perf Audience Edition)Performance Implications of Mobile Design (Perf Audience Edition)
Performance Implications of Mobile Design (Perf Audience Edition)Guy Podjarny
 
Step by Step Mobile Optimization
Step by Step Mobile OptimizationStep by Step Mobile Optimization
Step by Step Mobile OptimizationGuy Podjarny
 
Real Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and DemosReal Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and DemosPeter Moskovits
 
Building faster websites: web performance with WordPress
Building faster websites: web performance with WordPressBuilding faster websites: web performance with WordPress
Building faster websites: web performance with WordPressJohannes Siipola
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Timothy Fisher
 
7 Habits of Exceptional Performance
7 Habits of Exceptional Performance7 Habits of Exceptional Performance
7 Habits of Exceptional PerformanceNicole Sullivan
 
Mot cph when its just too slow
Mot cph when its just too slowMot cph when its just too slow
Mot cph when its just too slowDoug Sillars
 
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
"Turbo boost your website" aka BigPipe at Webinale 2014 in BerlinTobias Zander
 
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)jjhuff
 
Web前端性能分析工具导引
Web前端性能分析工具导引Web前端性能分析工具导引
Web前端性能分析工具导引冰 郭
 
IBM Connect 2016 - AD1548 - Building Responsive XPages Applications
IBM Connect 2016 - AD1548 - Building Responsive XPages ApplicationsIBM Connect 2016 - AD1548 - Building Responsive XPages Applications
IBM Connect 2016 - AD1548 - Building Responsive XPages Applicationsbeglee
 
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...George White
 

Was ist angesagt? (20)

Quantifying The Mobile Difference
Quantifying The Mobile DifferenceQuantifying The Mobile Difference
Quantifying The Mobile Difference
 
Jon Arne Sæterås - Give Responsive Design a mobile performance boost
Jon Arne Sæterås - Give Responsive Design a mobile performance boost Jon Arne Sæterås - Give Responsive Design a mobile performance boost
Jon Arne Sæterås - Give Responsive Design a mobile performance boost
 
10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamai
10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamai10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamai
10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamai
 
Raiders of the Fast Start: Frontend Performance Archaeology - Performance.now...
Raiders of the Fast Start: Frontend Performance Archaeology - Performance.now...Raiders of the Fast Start: Frontend Performance Archaeology - Performance.now...
Raiders of the Fast Start: Frontend Performance Archaeology - Performance.now...
 
Image-ine That: Image Optimization for Conversion Maximization
Image-ine That: Image Optimization for Conversion MaximizationImage-ine That: Image Optimization for Conversion Maximization
Image-ine That: Image Optimization for Conversion Maximization
 
Extreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NYExtreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NY
 
Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...
Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...
Velocity NY 2013 - From Slow to Fast: Improving Performance on Intuit Website...
 
Performance Implications of Mobile Design (Perf Audience Edition)
Performance Implications of Mobile Design (Perf Audience Edition)Performance Implications of Mobile Design (Perf Audience Edition)
Performance Implications of Mobile Design (Perf Audience Edition)
 
Step by Step Mobile Optimization
Step by Step Mobile OptimizationStep by Step Mobile Optimization
Step by Step Mobile Optimization
 
Real Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and DemosReal Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and Demos
 
Building faster websites: web performance with WordPress
Building faster websites: web performance with WordPressBuilding faster websites: web performance with WordPress
Building faster websites: web performance with WordPress
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011
 
7 Habits of Exceptional Performance
7 Habits of Exceptional Performance7 Habits of Exceptional Performance
7 Habits of Exceptional Performance
 
Mot cph when its just too slow
Mot cph when its just too slowMot cph when its just too slow
Mot cph when its just too slow
 
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
 
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
 
Web前端性能分析工具导引
Web前端性能分析工具导引Web前端性能分析工具导引
Web前端性能分析工具导引
 
IBM Connect 2016 - AD1548 - Building Responsive XPages Applications
IBM Connect 2016 - AD1548 - Building Responsive XPages ApplicationsIBM Connect 2016 - AD1548 - Building Responsive XPages Applications
IBM Connect 2016 - AD1548 - Building Responsive XPages Applications
 
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
 
After YSlow "A"
After YSlow "A"After YSlow "A"
After YSlow "A"
 

Ähnlich wie High Performance Mobile Web Optimization

From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamFrom Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamAndreas Grabner
 
SharePoint Performance - Best Practices from the Field
SharePoint Performance - Best Practices from the Field SharePoint Performance - Best Practices from the Field
SharePoint Performance - Best Practices from the Field Jason Himmelstein
 
SharePoint Performance: Best Practices from the Field
SharePoint Performance: Best Practices from the FieldSharePoint Performance: Best Practices from the Field
SharePoint Performance: Best Practices from the FieldJason Himmelstein
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedPromet Source
 
My Web Performance Dirty Secrets
My Web Performance Dirty SecretsMy Web Performance Dirty Secrets
My Web Performance Dirty SecretsFred Beringer
 
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
(DVO201) Scaling Your Web Applications with AWS Elastic BeanstalkAmazon Web Services
 
Website Performance
Website PerformanceWebsite Performance
Website PerformanceHugo Fonseca
 
10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamai
10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamai10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamai
10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamaielenae00
 
Raiders of the Fast Start: Frontend Performance Achaeology - Fluent 2018
Raiders of the Fast Start: Frontend Performance Achaeology - Fluent 2018Raiders of the Fast Start: Frontend Performance Achaeology - Fluent 2018
Raiders of the Fast Start: Frontend Performance Achaeology - Fluent 2018Katie Sylor-Miller
 
How to Build High Performance : WordPress
How to Build High Performance : WordPressHow to Build High Performance : WordPress
How to Build High Performance : WordPressDylan Burris
 
ChinaNetCloud - OaaS on Aliyun - AWDC Oct 2013
ChinaNetCloud - OaaS on Aliyun - AWDC Oct 2013ChinaNetCloud - OaaS on Aliyun - AWDC Oct 2013
ChinaNetCloud - OaaS on Aliyun - AWDC Oct 2013ChinaNetCloud
 
Delivering High Performance Websites with NGINX
Delivering High Performance Websites with NGINXDelivering High Performance Websites with NGINX
Delivering High Performance Websites with NGINXNGINX, Inc.
 
OaaS - Operations as a Service
OaaS - Operations as a ServiceOaaS - Operations as a Service
OaaS - Operations as a Serviceian236
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuningJohn McCaffrey
 
Webinar share point performance feb2016 slideshare
Webinar share point performance feb2016 slideshareWebinar share point performance feb2016 slideshare
Webinar share point performance feb2016 slideshareDynatrace
 
Digital Olympus Technical SEO Findings Whilst Taming An SEO Beast
Digital Olympus Technical SEO Findings Whilst Taming An SEO BeastDigital Olympus Technical SEO Findings Whilst Taming An SEO Beast
Digital Olympus Technical SEO Findings Whilst Taming An SEO BeastDawn Anderson MSc DigM
 

Ähnlich wie High Performance Mobile Web Optimization (20)

From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamFrom Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
 
Performance stack
Performance stackPerformance stack
Performance stack
 
SharePoint Performance - Best Practices from the Field
SharePoint Performance - Best Practices from the Field SharePoint Performance - Best Practices from the Field
SharePoint Performance - Best Practices from the Field
 
SharePoint Performance: Best Practices from the Field
SharePoint Performance: Best Practices from the FieldSharePoint Performance: Best Practices from the Field
SharePoint Performance: Best Practices from the Field
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speed
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
My Web Performance Dirty Secrets
My Web Performance Dirty SecretsMy Web Performance Dirty Secrets
My Web Performance Dirty Secrets
 
Neev - JSON Angular Magento
Neev - JSON Angular MagentoNeev - JSON Angular Magento
Neev - JSON Angular Magento
 
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
 
Website Performance
Website PerformanceWebsite Performance
Website Performance
 
10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamai
10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamai10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamai
10+апреля+лучшие+практики+и+инновации+вадим+береговский+akamai
 
Raiders of the Fast Start: Frontend Performance Achaeology - Fluent 2018
Raiders of the Fast Start: Frontend Performance Achaeology - Fluent 2018Raiders of the Fast Start: Frontend Performance Achaeology - Fluent 2018
Raiders of the Fast Start: Frontend Performance Achaeology - Fluent 2018
 
How to Build High Performance : WordPress
How to Build High Performance : WordPressHow to Build High Performance : WordPress
How to Build High Performance : WordPress
 
ChinaNetCloud - OaaS on Aliyun - AWDC Oct 2013
ChinaNetCloud - OaaS on Aliyun - AWDC Oct 2013ChinaNetCloud - OaaS on Aliyun - AWDC Oct 2013
ChinaNetCloud - OaaS on Aliyun - AWDC Oct 2013
 
Delivering High Performance Websites with NGINX
Delivering High Performance Websites with NGINXDelivering High Performance Websites with NGINX
Delivering High Performance Websites with NGINX
 
OaaS - Operations as a Service
OaaS - Operations as a ServiceOaaS - Operations as a Service
OaaS - Operations as a Service
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
Faster web pages
Faster web pagesFaster web pages
Faster web pages
 
Webinar share point performance feb2016 slideshare
Webinar share point performance feb2016 slideshareWebinar share point performance feb2016 slideshare
Webinar share point performance feb2016 slideshare
 
Digital Olympus Technical SEO Findings Whilst Taming An SEO Beast
Digital Olympus Technical SEO Findings Whilst Taming An SEO BeastDigital Olympus Technical SEO Findings Whilst Taming An SEO Beast
Digital Olympus Technical SEO Findings Whilst Taming An SEO Beast
 

Kürzlich hochgeladen

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Kürzlich hochgeladen (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

High Performance Mobile Web Optimization

  • 1. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 1 High Performance Mobile Web James D Bloom http://blog.jamesdbloom.com
  • 2. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 2 This talk…. §  Why We Should Care About Performance? §  Network –  Reducing Requests –  Reducing Bytes –  Increasing Bandwidth Efficiency §  Software –  Increasing Parallelism
  • 3. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 3 WHY - WE SHOULD CARE ABOUT PERFORMANCE?01
  • 4. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 4 -2.2s +15% downloads Firefox 0.4 -> 0.9s -25% searches Google -5s +12% revenue -50% hardware Shopzilla each -100ms +1% revenue Wallmart & Amazon Premature optimization is the root of all evil (or at least most of it) in programming. – Donald Knuth +1s -4% revenue Bing But… 40% abandon if >3s
  • 5. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 5 NETWORK - REDUCING REQUESTS - REDUCING BYTES - INCREASING BANDWIDTH EFFICIENCY 02
  • 6. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 6 CORELATION TO LOAD TIME Total Requests Image Requests Total Xfer Size Image Xfer Size Domains TOTAL REQUESTS 0.46 IMAGE REQUESTS 0.44 TOTAL XFER SIZE 0.40 IMAGE XFER SIZE 0.37 Reduce Requests DOMAINS 0.37 http://mobile.httparchive.org/ Based on: Alexa Top 1,000,000 Sites
  • 7. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 7 COMBINE REQUESTS - BUNDLING §  JavaScript Bundle –  Combine all files into single bundle §  CSS Bundle –  Combine all files into single bundle §  Image Sprite –  Combine all images into CSS Sprite
  • 8. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 8 COMBINE REQUESTS - INLINING §  Inlining –  dataURI for external resources –  Base64 larger by 8/6
  • 9. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 9 COMBINE REQUESTS - INLINING §  First  Load:   –  inline  resources  and  set  cookie   –  put  resources  in  localStorage  and  update  cookie   §  Subsequent  Load:   –  check  cookie   •  if  updated   –  load  resources  from  localStorage  (at  top  of  page)   •  if  ini>al  value  -­‐>  no  JavaScript  or  localStorage   –  return  with  resources  as  external  links   §  Bing   –  1st  request  54.9  KB   –  2nd  request  5.5  KB  
  • 10. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 10 NETWORK - REDUCING REQUESTS - REDUCING BYTES - INCREASING BANDWIDTH EFFICIENCY 02
  • 11. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 11 RESPONSE SIZE (in kB) 358 112 33 23 10 Images Scripts HTML Stylesheets Other IMAGES 67% SCRIPTS 21% HTML 6% STYLESHEETS 4% OTHER 2% Reduce Image Size http://mobile.httparchive.org/ Based on: Alexa Top 1,000,000 Sites
  • 12. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 12 REDUCING BYTES – ADAPTIVE RESOURCES §  Adaptive Images –  UA sniffing or media queries –  Major breakpoints or server side scaling §  Adaptive JavaScript –  UA sniffing for device specific JS §  Adaptive CSS –  Media queries for device specific CSS
  • 13. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 13 REDUCING BYTES - MINIFY §  Minify JS & CSS –  Typically during bundling §  Mini JS framework –  don’t send desktop JS to mobile
  • 14. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 14 REDUCING BYTES §  Compression –  Use gzip for text resources –  Maximize lossless compression for images §  Reduce Upload –  Reduce / remove cookies –  Server-side cookie –  Cookie Free Domain •  static resources •  CDN §  HIJAX –  Highjack full page request –  AJAX to replace <body/> –  Avoids reloading CSS, JS, background images §  Images –  Avoid animated gifs •  static image + JS
  • 15. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 15 NETWORK - REDUCING REQUESTS - REDUCING BYTES - INCREASING BANDWIDTH EFFICIENCY 02
  • 16. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 16 PARALLELIZE DOWNLOADS §  CSS at the top –  download background images –  avoid FOUC §  JS at the bottom –  avoid SPOF
  • 17. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 17 PARALLELIZE DOWNLOADS §  Domain Sharding –  > 6 resources due to extra domain lookups
  • 18. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 18 DELAYING DOWNLOAD §  delay load with document.appendChild(node)
  • 19. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 19 EARLY DOWNLOAD §  Eager loading –  Load static pages eagerly –  Store in localStorage –  Uses spare bandwidth
  • 20. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 20 SOFTWARE - INCREASING PARALLELISM03
  • 21. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 21 PARALLEL SERVICE CALLS render view build model service & DB calls flush <head/> controller task executor view flush <body/> §  Parallelize service calls / DB queries §  Render view (and flush <head/>) in parallel
  • 22. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 22 PARALLEL DOWNLOAD §  Flush <head/> early –  CSS in parallel –  CSS background images (sprites) in parallel
  • 23. © Equal Experts UK Ltd 2011 - confidential www.equalexperts.com 23 Questions….