SlideShare a Scribd company logo
1 of 53
Download to read offline
Lead UI Developer
at Field Intelligence
Anna Migas
Google Developer Expert
Anna Migas
@szynszyliszys
Web performance
op
ti
misa
ti
ons for the
harsh condi
ti
ons
web performance
User experience connected to the
web performance
User experience connected to the
web performance
as experienced in harsh daily
condi
ti
ons
“Web performance refers to the
speed in which web pages are
downloaded and displayed
on the user's web browser“
wikipedia.org/wiki/Web_performance
Why should you care?
Africa is far.
It is a problem for anyone:
1. Using an old device
2. Located in a rural area
3. Using an enterprise app that is
hard to op
ti
mise
Most web performance
metrics and resources
are developed with a
privileged user in mind.
h
tt
ps://web.dev/
tti
/
h
tt
ps://wpostats.com/2018/06/13/zalando-revenue.html
For some users, the
good web performance
is not achievable at all.
“At a high level, there are two primary
performance bo
tt
lenecks on the web:
1. Networking - the round-trip
ti
me to acquire
an asset or data payload from a remote server
2. End-user Device Compute - the amount of
computa
ti
onal overhead required on the
end-user's device”
h
tt
ps://www.webperf.
ti
ps/
ti
p/cached-js-misconcep
ti
ons/
“At a high level, there are two primary
performance bo
tt
lenecks on the web:
1. Networking - the round-trip
ti
me to acquire
an asset or data payload from a remote server
2. End-user Device Compute - the amount of
computa
ti
onal overhead required on the
end-user's device”
h
tt
ps://www.webperf.
ti
ps/
ti
p/cached-js-misconcep
ti
ons/
“At a high level, there are two primary
performance bo
tt
lenecks on the web:
1. Networking - the round-trip
ti
me to acquire
an asset or data payload from a remote server
2. End-user Device Compute - the amount of
computa
ti
onal overhead required on the
end-user's device”
h
tt
ps://www.webperf.
ti
ps/
ti
p/cached-js-misconcep
ti
ons/
“At a high level, there are two primary
performance bo
tt
lenecks on the web:
1. Networking - the round-trip
ti
me to acquire
an asset or data payload from a remote server
2. End-user Device Compute - the amount of
computa
ti
onal overhead required on the
end-user's device”
h
tt
ps://www.webperf.
ti
ps/
ti
p/cached-js-misconcep
ti
ons/
Latency
Latency is generally considered to be the
amount of
ti
me it takes from when a request is
made by the user to the
ti
me it takes for the
response to get back to that user.
h
tt
ps://developer.mozilla.org/en-US/docs/Web/Performance/
Latency in most parts of
Africa is really high.
High latency means long
Time To First Byte
(TTFB).
Latency in most parts of
Africa is really high.
High latency means long
Time To First Byte
(TTFB).
“While a good TTFB doesn’t
necessarily mean you will have a
fast website, a bad TTFB almost
certainly guarantees a slow one.”
— Harry Roberts
h
tt
ps://csswizardry.com/2019/08/
ti
me-to-
fi
rst-byte-what-it-is-and-why-it-ma
tt
ers/
“At a high level, there are two primary
performance bo
tt
lenecks on the web:
1. Networking - the round-trip
ti
me to acquire
an asset or data payload from a remote server
2. End-user Device Compute - the amount of
computa
ti
onal overhead required on the
end-user's device”
“Time spent in Parse/Compile can
often be 2–5x as long on phones
as on desktop.”
— Addy Osmani
h
tt
ps://medium.com/reloading/javascript-start-up-performance-69200f43b201
h
tt
ps://medium.com/reloading/javascript-start-up-performance-69200f43b201
Devices used
“The country [Nigeria] is considered a mobile-
fi
rst market where infrastructure and online
usage development skipped wide-ranging
desktop PC adop
ti
on and went straight to
mobile internet usage via inexpensive
smartphones instead.”
h
tt
ps://www.sta
ti
sta.com/sta
ti
s
ti
cs/183849/internet-users-nigeria/
If everything is slow,
what can we do?
1. Visibility of system
status
“The design should always keep users
informed about what is going on, through
appropriate feedback within a reasonable
amount of
ti
me.”
h
tt
ps://www.nngroup.com/ar
ti
cles/ten-usability-heuris
ti
cs/
1. Visibility of system
status
“The design should always keep users
informed about what is going on, through
appropriate feedback within a reasonable
amount of
ti
me.”
h
tt
ps://www.nngroup.com/ar
ti
cles/ten-usability-heuris
ti
cs/
Make sure to give user informa
ti
on
as fast as possible:
• What is going on
• How long it can take
• Once error occurs (and what can be done)
Take into account digital literacy
• Use simple language
• Discourage damaging ac
ti
ons
• Explain consequences of ac
ti
ons
2. Render ini
ti
al
informa
ti
on ASAP
Make sure there is some ini
ti
al content visible
le
tti
ng user know what is going on quick.
3. Leverage Progressive
Enhancement
Make it possible to achieve the most crucial
ac
ti
on
fi
rst, add extra features and
fi
reworks
on top of that.
4. Avoid request
chaining and roundtrips
Consider using resource hints.
A. Preconnect
Eliminate many costly roundtrips from your
request path (for example establish
connec
ti
on with CDN used later)
<link href="https://cdn.domain.com" rel="preconnect"
crossorigin>
B. Prefetch
Fetch resources and store them in cache.
Use for resources that might be needed for
next naviga
ti
on.
<link rel="prefetch" href="/images/big.jpeg">
C. Preload
Load late-discovered resources early.
<link rel="preload" href="font.woff2" as="font"
type="font/woff2" crossorigin>
5. Lazy load resources
that are not cri
ti
cal
Don’t force user to download resources they
might never discover.
<img src="image.png" loading="lazy" alt=“alt text”
width="200" height="200">
6. Learn about network
resource hints
Network Informa
ti
on API helps web
applica
ti
ons to access informa
ti
on about the
user's network.
navigator.connection.saveData
h
tt
ps://developer.mozilla.org/en-US/docs/Web/API/Network_Informa
ti
on_API
7. Test for back/forward
cache
If a user clicks on a naviga
ti
on item by
mistake, it can minimise the
ti
me to navigate
back.
h
tt
ps://developer.chrome.com/docs/devtools/applica
ti
on/back-forward-cache/
h
tt
ps://web.dev/bfcache/
9. Avoid crea
ti
ng too
many layers
Each layer created by the browser takes
device’s resources.
h
tt
ps://blog.logrocket.com/eliminate-content-repaints-with-the-new-layers-panel-in-
chrome-e2c306d4d752/
Summary
★ Let user know what is going on
★ Load ini
ti
al informa
ti
on early
★ Progressively enhance your website
★ Avoid request chaining and use resource
hints
★ Lazy load content below the fold
★ Leverage Network Informa
ti
on API
Summary
★ Op
ti
mise for back/forward cache
★ Consider using Service Worker if applicable
★ Avoid using too many layers and repain
ti
ng
content
Resources
• MDN: Understanding latency
h
tt
ps://developer.mozilla.org/en-US/docs/Web/Performance/
Understanding_latency
• Interac
ti
ve map of network speed worldwide
h
tt
ps://www.cable.co.uk/broadband/speed/worldwide-speed-
league/
• The African web ecosystem - a paper
h
tt
ps://www.caida.org/catalog/papers/
2018_exploring_analysing_african_web/
exploring_analysing_african_web.pdf
Resources
• web.dev: Establishing early connec
ti
ons with resource hints
h
tt
ps://web.dev/preconnect-and-dns-prefetch/
• web.dev: Preloading cri
ti
cal assets
h
tt
ps://web.dev/preload-cri
ti
cal-assets/
• web.dev: Loading third party assets
h
tt
ps://web.dev/e
ffi
ciently-load-third-party-javascript/
Resources
• The psychology of web performance
h
tt
ps://blog.uptrends.com/web-performance/the-psychology-of-
web-performance/
• Designer's guide to perceived web performance
h
tt
ps://marvelapp.com/blog/a-designers-guide-to-perceived-
performance/
Anna Migas
@szynszyliszys
Thank you!

More Related Content

What's hot

What's hot (20)

Advanced SEO: Logs, Load, and Language
Advanced SEO: Logs, Load, and LanguageAdvanced SEO: Logs, Load, and Language
Advanced SEO: Logs, Load, and Language
 
Google Sheets For SEO - Tom Pool - London SEO Meetup XL
Google Sheets For SEO - Tom Pool - London SEO Meetup XLGoogle Sheets For SEO - Tom Pool - London SEO Meetup XL
Google Sheets For SEO - Tom Pool - London SEO Meetup XL
 
Don't be a cannibal
Don't be a cannibalDon't be a cannibal
Don't be a cannibal
 
SEO Of Tomorrow_ The Rise Of Automation.pdf
SEO Of Tomorrow_ The Rise Of Automation.pdfSEO Of Tomorrow_ The Rise Of Automation.pdf
SEO Of Tomorrow_ The Rise Of Automation.pdf
 
Switching domain 3 months before an IPO - Lucia Lecesne - BrightonSEO April 2022
Switching domain 3 months before an IPO - Lucia Lecesne - BrightonSEO April 2022Switching domain 3 months before an IPO - Lucia Lecesne - BrightonSEO April 2022
Switching domain 3 months before an IPO - Lucia Lecesne - BrightonSEO April 2022
 
Data Studio for SEOs: Reporting Automation Tips - Weekly SEO with Lazarina Stoy
Data Studio for SEOs: Reporting Automation Tips - Weekly SEO with Lazarina StoyData Studio for SEOs: Reporting Automation Tips - Weekly SEO with Lazarina Stoy
Data Studio for SEOs: Reporting Automation Tips - Weekly SEO with Lazarina Stoy
 
How to Create SEO Friendly Website Architecture
How to Create SEO Friendly Website ArchitectureHow to Create SEO Friendly Website Architecture
How to Create SEO Friendly Website Architecture
 
REST full API Design
REST full API DesignREST full API Design
REST full API Design
 
Visual Search Tools and Tactics by Crystal Carter at MozCon 2022
Visual Search Tools and Tactics by Crystal Carter at MozCon 2022Visual Search Tools and Tactics by Crystal Carter at MozCon 2022
Visual Search Tools and Tactics by Crystal Carter at MozCon 2022
 
BrightonSEO April 2023 Similar AI: Automation recipes for SEO success
BrightonSEO April 2023 Similar AI: Automation recipes for SEO successBrightonSEO April 2023 Similar AI: Automation recipes for SEO success
BrightonSEO April 2023 Similar AI: Automation recipes for SEO success
 
Probabilistic Thinking in SEO - BrightonSEO October 2022
Probabilistic Thinking in SEO - BrightonSEO October 2022Probabilistic Thinking in SEO - BrightonSEO October 2022
Probabilistic Thinking in SEO - BrightonSEO October 2022
 
Swipe left: Why your content is getting ghosted
Swipe left: Why your content is getting ghostedSwipe left: Why your content is getting ghosted
Swipe left: Why your content is getting ghosted
 
How Secure Are Your APIs?
How Secure Are Your APIs?How Secure Are Your APIs?
How Secure Are Your APIs?
 
Developing SEO audits that maximize growth #dmssconference
Developing SEO audits that maximize growth #dmssconferenceDeveloping SEO audits that maximize growth #dmssconference
Developing SEO audits that maximize growth #dmssconference
 
Speed up alt text generation without coding skills
Speed up alt text generation without coding skillsSpeed up alt text generation without coding skills
Speed up alt text generation without coding skills
 
Light pen Technology
Light pen TechnologyLight pen Technology
Light pen Technology
 
Cómo Gestionar Proyectos SEO Complejos de Forma Exitosa #SEonthebeach
Cómo Gestionar Proyectos SEO Complejos de Forma Exitosa #SEonthebeachCómo Gestionar Proyectos SEO Complejos de Forma Exitosa #SEonthebeach
Cómo Gestionar Proyectos SEO Complejos de Forma Exitosa #SEonthebeach
 
apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...
apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...
apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...
 
APIs: The Glue of Microservices - Introduction to the Cell-based Architecture
APIs: The Glue of Microservices - Introduction to the Cell-based ArchitectureAPIs: The Glue of Microservices - Introduction to the Cell-based Architecture
APIs: The Glue of Microservices - Introduction to the Cell-based Architecture
 
A Crash Course in Technical SEO from Patrick Stox - Beer & SEO Meetup May 2019
A Crash Course in Technical SEO from Patrick Stox - Beer & SEO Meetup May 2019A Crash Course in Technical SEO from Patrick Stox - Beer & SEO Meetup May 2019
A Crash Course in Technical SEO from Patrick Stox - Beer & SEO Meetup May 2019
 

Similar to Web performance optimisations for the harsh conditions - Anna Migas

Geographic Distribution for Global Web Application Performance
Geographic Distribution for Global Web Application PerformanceGeographic Distribution for Global Web Application Performance
Geographic Distribution for Global Web Application Performance
kkjjkevin03
 
Mobile Performance Testing - Testing the Server
Mobile Performance Testing  - Testing the ServerMobile Performance Testing  - Testing the Server
Mobile Performance Testing - Testing the Server
XBOSoft
 

Similar to Web performance optimisations for the harsh conditions - Anna Migas (20)

Secret performance metric - Modern Frontends
Secret performance metric - Modern FrontendsSecret performance metric - Modern Frontends
Secret performance metric - Modern Frontends
 
Secret Web Performance Metric - DevDayBe
Secret Web Performance Metric - DevDayBeSecret Web Performance Metric - DevDayBe
Secret Web Performance Metric - DevDayBe
 
Secret Performance Metric - Armada JS.pdf
Secret Performance Metric - Armada JS.pdfSecret Performance Metric - Armada JS.pdf
Secret Performance Metric - Armada JS.pdf
 
The secret web performance metric no one is talking about
The secret web performance metric no one is talking aboutThe secret web performance metric no one is talking about
The secret web performance metric no one is talking about
 
Supercharge Application Delivery to Satisfy Users
Supercharge Application Delivery to Satisfy UsersSupercharge Application Delivery to Satisfy Users
Supercharge Application Delivery to Satisfy Users
 
Progressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoProgressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent Convento
 
Browser Based Performance Testing and Tuning
Browser Based Performance Testing and TuningBrowser Based Performance Testing and Tuning
Browser Based Performance Testing and Tuning
 
Demystifying web performance tooling and metrics
Demystifying web performance tooling and metricsDemystifying web performance tooling and metrics
Demystifying web performance tooling and metrics
 
What is Nginx and Why You Should to Use it with Wordpress Hosting
What is Nginx and Why You Should to Use it with Wordpress HostingWhat is Nginx and Why You Should to Use it with Wordpress Hosting
What is Nginx and Why You Should to Use it with Wordpress Hosting
 
Getting a Grip on CDN Performance - Why and How
Getting a Grip on CDN Performance - Why and HowGetting a Grip on CDN Performance - Why and How
Getting a Grip on CDN Performance - Why and How
 
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
 
Web Performance Optimization
Web Performance OptimizationWeb Performance Optimization
Web Performance Optimization
 
Progressive Web Apps for Education
Progressive Web Apps for EducationProgressive Web Apps for Education
Progressive Web Apps for Education
 
Geographic Distribution for Global Web Application Performance
Geographic Distribution for Global Web Application PerformanceGeographic Distribution for Global Web Application Performance
Geographic Distribution for Global Web Application Performance
 
Helen Tabunshchyk "Handling large amounts of traffic on the Edge"
Helen Tabunshchyk "Handling large amounts of traffic on the Edge"Helen Tabunshchyk "Handling large amounts of traffic on the Edge"
Helen Tabunshchyk "Handling large amounts of traffic on the Edge"
 
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
 
Move fast and make things with microservices
Move fast and make things with microservicesMove fast and make things with microservices
Move fast and make things with microservices
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Mobile Performance Testing - Testing the Server
Mobile Performance Testing  - Testing the ServerMobile Performance Testing  - Testing the Server
Mobile Performance Testing - Testing the Server
 
20181023 progressive web_apps_are_here_sfcampua
20181023 progressive web_apps_are_here_sfcampua20181023 progressive web_apps_are_here_sfcampua
20181023 progressive web_apps_are_here_sfcampua
 

More from Wey Wey Web

More from Wey Wey Web (20)

Portable, secure, and lightweight: Wasm runtimes and their use-cases - Natali...
Portable, secure, and lightweight: Wasm runtimes and their use-cases - Natali...Portable, secure, and lightweight: Wasm runtimes and their use-cases - Natali...
Portable, secure, and lightweight: Wasm runtimes and their use-cases - Natali...
 
Auditing Design Systems for Accessibility - Anna E. Cook
Auditing Design Systems for Accessibility - Anna E. CookAuditing Design Systems for Accessibility - Anna E. Cook
Auditing Design Systems for Accessibility - Anna E. Cook
 
Adaptive Designs, Beyond Pixel Perfection - Stephanie Walter
Adaptive Designs, Beyond Pixel Perfection - Stephanie WalterAdaptive Designs, Beyond Pixel Perfection - Stephanie Walter
Adaptive Designs, Beyond Pixel Perfection - Stephanie Walter
 
Sharing is caring: what to know before you build a Research Repository - Juli...
Sharing is caring: what to know before you build a Research Repository - Juli...Sharing is caring: what to know before you build a Research Repository - Juli...
Sharing is caring: what to know before you build a Research Repository - Juli...
 
Unlocking collaboration: A framework for developers and designers - Alicia Ca...
Unlocking collaboration: A framework for developers and designers - Alicia Ca...Unlocking collaboration: A framework for developers and designers - Alicia Ca...
Unlocking collaboration: A framework for developers and designers - Alicia Ca...
 
3 reasons to switch to OKLCH - Anton Lovchikov
3 reasons to switch to OKLCH - Anton Lovchikov3 reasons to switch to OKLCH - Anton Lovchikov
3 reasons to switch to OKLCH - Anton Lovchikov
 
ChatGPT and AI for web developers - Maximiliano Firtman
ChatGPT and AI for web developers - Maximiliano FirtmanChatGPT and AI for web developers - Maximiliano Firtman
ChatGPT and AI for web developers - Maximiliano Firtman
 
Declarative Design - Jeremy Keith - Wey Wey Wey 2023
Declarative Design - Jeremy Keith - Wey Wey Wey 2023Declarative Design - Jeremy Keith - Wey Wey Wey 2023
Declarative Design - Jeremy Keith - Wey Wey Wey 2023
 
Form follows emotion - Isabella De Cuppis
Form follows emotion - Isabella De CuppisForm follows emotion - Isabella De Cuppis
Form follows emotion - Isabella De Cuppis
 
UX for emerging tech - Josephine Scholtes
UX for emerging tech - Josephine ScholtesUX for emerging tech - Josephine Scholtes
UX for emerging tech - Josephine Scholtes
 
Collaborative software with State Machines - Laura Kalbag
Collaborative software with State Machines -  Laura KalbagCollaborative software with State Machines -  Laura Kalbag
Collaborative software with State Machines - Laura Kalbag
 
Lessons Learned from building Session Replay - Francesco Novy
Lessons Learned from building Session Replay - Francesco NovyLessons Learned from building Session Replay - Francesco Novy
Lessons Learned from building Session Replay - Francesco Novy
 
Let's get visual. Visual testing in your project - Ramona Schwering
Let's get visual. Visual testing in your project - Ramona SchweringLet's get visual. Visual testing in your project - Ramona Schwering
Let's get visual. Visual testing in your project - Ramona Schwering
 
Solving Common Web Component Problems - Simon MacDonald
Solving Common Web Component Problems - Simon MacDonaldSolving Common Web Component Problems - Simon MacDonald
Solving Common Web Component Problems - Simon MacDonald
 
The Future is Malleable - Aleksandra Sikora
The Future is Malleable - Aleksandra SikoraThe Future is Malleable - Aleksandra Sikora
The Future is Malleable - Aleksandra Sikora
 
Trending tools & methodologies for UX - Josephine Scholtes.pdf
Trending tools & methodologies for UX - Josephine Scholtes.pdfTrending tools & methodologies for UX - Josephine Scholtes.pdf
Trending tools & methodologies for UX - Josephine Scholtes.pdf
 
Decoding Web Accessibility through Testing - Anuradha Kumari
Decoding Web Accessibility through Testing  - Anuradha KumariDecoding Web Accessibility through Testing  - Anuradha Kumari
Decoding Web Accessibility through Testing - Anuradha Kumari
 
Good Security is one question away - Wiktoria Dalach
Good Security is one  question away - Wiktoria DalachGood Security is one  question away - Wiktoria Dalach
Good Security is one question away - Wiktoria Dalach
 
Dynamic CSS Secrets - Lea Verou
Dynamic CSS Secrets - Lea Verou Dynamic CSS Secrets - Lea Verou
Dynamic CSS Secrets - Lea Verou
 
The Misty Report - Douglas Crockford
The Misty Report - Douglas CrockfordThe Misty Report - Douglas Crockford
The Misty Report - Douglas Crockford
 

Recently uploaded

TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 

Web performance optimisations for the harsh conditions - Anna Migas

  • 1. Lead UI Developer at Field Intelligence Anna Migas Google Developer Expert
  • 4. User experience connected to the web performance
  • 5. User experience connected to the web performance as experienced in harsh daily condi ti ons
  • 6. “Web performance refers to the speed in which web pages are downloaded and displayed on the user's web browser“ wikipedia.org/wiki/Web_performance
  • 7.
  • 8. Why should you care? Africa is far.
  • 9. It is a problem for anyone: 1. Using an old device 2. Located in a rural area 3. Using an enterprise app that is hard to op ti mise
  • 10. Most web performance metrics and resources are developed with a privileged user in mind.
  • 13. For some users, the good web performance is not achievable at all.
  • 14. “At a high level, there are two primary performance bo tt lenecks on the web: 1. Networking - the round-trip ti me to acquire an asset or data payload from a remote server 2. End-user Device Compute - the amount of computa ti onal overhead required on the end-user's device” h tt ps://www.webperf. ti ps/ ti p/cached-js-misconcep ti ons/
  • 15. “At a high level, there are two primary performance bo tt lenecks on the web: 1. Networking - the round-trip ti me to acquire an asset or data payload from a remote server 2. End-user Device Compute - the amount of computa ti onal overhead required on the end-user's device” h tt ps://www.webperf. ti ps/ ti p/cached-js-misconcep ti ons/
  • 16. “At a high level, there are two primary performance bo tt lenecks on the web: 1. Networking - the round-trip ti me to acquire an asset or data payload from a remote server 2. End-user Device Compute - the amount of computa ti onal overhead required on the end-user's device” h tt ps://www.webperf. ti ps/ ti p/cached-js-misconcep ti ons/
  • 17. “At a high level, there are two primary performance bo tt lenecks on the web: 1. Networking - the round-trip ti me to acquire an asset or data payload from a remote server 2. End-user Device Compute - the amount of computa ti onal overhead required on the end-user's device” h tt ps://www.webperf. ti ps/ ti p/cached-js-misconcep ti ons/
  • 18. Latency Latency is generally considered to be the amount of ti me it takes from when a request is made by the user to the ti me it takes for the response to get back to that user. h tt ps://developer.mozilla.org/en-US/docs/Web/Performance/
  • 19. Latency in most parts of Africa is really high. High latency means long Time To First Byte (TTFB).
  • 20. Latency in most parts of Africa is really high. High latency means long Time To First Byte (TTFB).
  • 21. “While a good TTFB doesn’t necessarily mean you will have a fast website, a bad TTFB almost certainly guarantees a slow one.” — Harry Roberts h tt ps://csswizardry.com/2019/08/ ti me-to- fi rst-byte-what-it-is-and-why-it-ma tt ers/
  • 22. “At a high level, there are two primary performance bo tt lenecks on the web: 1. Networking - the round-trip ti me to acquire an asset or data payload from a remote server 2. End-user Device Compute - the amount of computa ti onal overhead required on the end-user's device”
  • 23. “Time spent in Parse/Compile can often be 2–5x as long on phones as on desktop.” — Addy Osmani h tt ps://medium.com/reloading/javascript-start-up-performance-69200f43b201
  • 25. Devices used “The country [Nigeria] is considered a mobile- fi rst market where infrastructure and online usage development skipped wide-ranging desktop PC adop ti on and went straight to mobile internet usage via inexpensive smartphones instead.” h tt ps://www.sta ti sta.com/sta ti s ti cs/183849/internet-users-nigeria/
  • 26. If everything is slow, what can we do?
  • 27. 1. Visibility of system status “The design should always keep users informed about what is going on, through appropriate feedback within a reasonable amount of ti me.” h tt ps://www.nngroup.com/ar ti cles/ten-usability-heuris ti cs/
  • 28. 1. Visibility of system status “The design should always keep users informed about what is going on, through appropriate feedback within a reasonable amount of ti me.” h tt ps://www.nngroup.com/ar ti cles/ten-usability-heuris ti cs/
  • 29. Make sure to give user informa ti on as fast as possible: • What is going on • How long it can take • Once error occurs (and what can be done)
  • 30.
  • 31.
  • 32. Take into account digital literacy • Use simple language • Discourage damaging ac ti ons • Explain consequences of ac ti ons
  • 33. 2. Render ini ti al informa ti on ASAP Make sure there is some ini ti al content visible le tti ng user know what is going on quick.
  • 34.
  • 35.
  • 36. 3. Leverage Progressive Enhancement Make it possible to achieve the most crucial ac ti on fi rst, add extra features and fi reworks on top of that.
  • 37.
  • 38. 4. Avoid request chaining and roundtrips Consider using resource hints.
  • 39. A. Preconnect Eliminate many costly roundtrips from your request path (for example establish connec ti on with CDN used later) <link href="https://cdn.domain.com" rel="preconnect" crossorigin>
  • 40. B. Prefetch Fetch resources and store them in cache. Use for resources that might be needed for next naviga ti on. <link rel="prefetch" href="/images/big.jpeg">
  • 41. C. Preload Load late-discovered resources early. <link rel="preload" href="font.woff2" as="font" type="font/woff2" crossorigin>
  • 42. 5. Lazy load resources that are not cri ti cal Don’t force user to download resources they might never discover. <img src="image.png" loading="lazy" alt=“alt text” width="200" height="200">
  • 43. 6. Learn about network resource hints Network Informa ti on API helps web applica ti ons to access informa ti on about the user's network. navigator.connection.saveData h tt ps://developer.mozilla.org/en-US/docs/Web/API/Network_Informa ti on_API
  • 44. 7. Test for back/forward cache If a user clicks on a naviga ti on item by mistake, it can minimise the ti me to navigate back.
  • 46. 9. Avoid crea ti ng too many layers Each layer created by the browser takes device’s resources.
  • 48. Summary ★ Let user know what is going on ★ Load ini ti al informa ti on early ★ Progressively enhance your website ★ Avoid request chaining and use resource hints ★ Lazy load content below the fold ★ Leverage Network Informa ti on API
  • 49. Summary ★ Op ti mise for back/forward cache ★ Consider using Service Worker if applicable ★ Avoid using too many layers and repain ti ng content
  • 50. Resources • MDN: Understanding latency h tt ps://developer.mozilla.org/en-US/docs/Web/Performance/ Understanding_latency • Interac ti ve map of network speed worldwide h tt ps://www.cable.co.uk/broadband/speed/worldwide-speed- league/ • The African web ecosystem - a paper h tt ps://www.caida.org/catalog/papers/ 2018_exploring_analysing_african_web/ exploring_analysing_african_web.pdf
  • 51. Resources • web.dev: Establishing early connec ti ons with resource hints h tt ps://web.dev/preconnect-and-dns-prefetch/ • web.dev: Preloading cri ti cal assets h tt ps://web.dev/preload-cri ti cal-assets/ • web.dev: Loading third party assets h tt ps://web.dev/e ffi ciently-load-third-party-javascript/
  • 52. Resources • The psychology of web performance h tt ps://blog.uptrends.com/web-performance/the-psychology-of- web-performance/ • Designer's guide to perceived web performance h tt ps://marvelapp.com/blog/a-designers-guide-to-perceived- performance/