SlideShare a Scribd company logo
Fast and Beautiful Apps:
Optimisations for When
It’s Just Too Slow
Doug Sillars
@DougSillars
QA Serbia
September 17, 2019
Contact Me:
@DougSillars
Doug.Sillars@gmail.com
www.dougsillars.com
Doug Sillars
Freelance Developer Relations
Performance Audits: Web/Native
Workshops:
Performance/Images/Video/ML/AR
http://bit.ly/HighPerformanceAndroidApps
Belgrade when its just too slow
0.5
0.6
0.7
0.8
0.9
Standing in Line Standing on the
edge of a virtual
cliff
Experiencing
Mobile Delays
Solving a Math
Problem
https://www.ericsson.com/res/docs/2016/mobility-report/emr-feb-2016-the-stress-of-steaming-delays.pdf
Stress
What Is Fast?
https://commons.wikimedia.org/wiki/File:Lightning_Pritzerbe_01_(MK).jpg
Fast is a Human Perception
• 100ms:
• 1s:
• 10s:
https://www.nngroup.com/articles/response-times-3-important-limits/
Perceived as instantaneous
Limit for uninterrupted train of thought: Delay is
noticed, but generally accepted
Limit for keeping focus
Fast is a Human Perception
In 1993:
Fast is a Human Perception
• 100ms:
• 1s:
• 10s:
Perceived as instantaneous
Limit for uninterrupted train of thought: Delay is noticed,
but generally accepted
Limit for keeping focus
65ms: ranged from 34-164ms
https://calendar.perfplanet.com/2018/magic-numbers/
Fast is a Human Perception
• 100ms:
• 1s:
• 10s: 3-5s:
Perceived as instantaneous
Limit for uninterrupted train of thought: Delay is noticed,
but generally accepted
Limit for keeping focus
65ms: ranged from 34-164ms
Performance Studies
3s: 53% of Users Abandon Mobile Sites
500ms: 26% Frustration
8% Engagement
100ms: 1% Revenue Walmart & Amazon (Desktop 2001)
4% Mobile Users Throw Their Phones
https://www.doubleclickbygoogle.com/articles/mobile-speed-matters
http://bit.ly/mobileWebStress
http://www.globaldots.com/how-website-speed-affects-conversion-rates/
https://www.mobilejoomla.com/blog/172-responsive-design-vs-server-side-solutions-infographic.html
Profile & Benchmark Where You Are Today
Video Optimizer
developer.att.com/Video-Optimizer
WebPageTest
www.webpagetest.org
Charles Proxy
www.charlesproxy.com
Charles Proxy
Video Optimizer
Video Optimizer
Video Optimizer
WebPageTest
WebPageTest
Profile & Benchmark Where You Are Today
Video Optimizer
developer.att.com/Video-Optimizer
WebPageTest
www.webpagetest.org
Charles Proxy
www.charlesproxy.com
https://pixabay.com/en/office-business-accountant-620822/
https://www.maxpixel.net/Mobile-Cellphone-Hand-View-Mountains-Touchscreen-2590471
https://opensignal.com/reports/2018/02/state-of-lte
Network Coverage Can be Variable
https://pixabay.com/en/office-business-accountant-620822/
Profile & Benchmark Where You Are Today
Standardize your connection
Devices
Your Device is Not Your Customer’s Device
https://deviceatlas.com/blog/targeting-android-devices-sdk-os-version-statistics#screensize
Older Phones are Drastically Slower
Websites load 20-50%
faster Year over year
https://arxiv.org/pdf/1603.02293.pdf
https://www.androidpolice.com/2018/06/29/alcatel-1x-review-android-go-huge-compromise-every-sense-including-price/
Belgrade when its just too slow
Profile & Benchmark Where You Are Today
Pick a mid-low range phone
Profile & Benchmark Where You Are Today
Pick a mid-low range phone
Test on Slower Networks
Is It Fast?
Is It Fast?
Is It Fast?
Set Goals
Rules for Speed
• Deliver Content Quickly
• Faster requests
• More Efficient
• Images and Video are Large Files
App Startup
JSON Headers: Request
App Startup
JSON Headers:Response
HTTP/1.1 200 OK
Date Sun, 28 Oct 2018 09:26:24 GMT
Server Apache
X-Robots-Tag noindex
X-Content-Type-Options nosniff
Access-Control-Expose-Headers X-WP-Total, X-WP-TotalPages
Access-Control-Allow-Headers Authorization, Content-Type
X-WP-Total 5222
X-WP-TotalPages 523
Link ; rel="next"
Allow GET
Keep-Alive timeout=5, max=100
Transfer-Encoding chunked
Content-Type application/json; charset=UTF-8
Connection keep-alive
JSON Headers:Response
HTTP/1.1 200 OK
Date Sun, 28 Oct 2018 09:26:24 GMT
Server Apache
X-Robots-Tag noindex
X-Content-Type-Options nosniff
Access-Control-Expose-Headers X-WP-Total, X-WP-TotalPages
Access-Control-Allow-Headers Authorization, Content-Type
X-WP-Total 5222
X-WP-TotalPages 523
Link ; rel="next"
Allow GET
Keep-Alive timeout=5, max=100
Transfer-Encoding chunked
Content-Type application/json; charset=UTF-8
Connection keep-alive
Content-Encoding:
Cache-Control:
JSON Headers:Response
HTTP/1.1 200 OK
Date Sun, 28 Oct 2018 09:26:24 GMT
Server Apache
X-Robots-Tag noindex
X-Content-Type-Options nosniff
Access-Control-Expose-Headers X-WP-Total, X-WP-TotalPages
Access-Control-Allow-Headers Authorization, Content-Type
X-WP-Total 5222
X-WP-TotalPages 523
Link ; rel="next"
Allow GET
Keep-Alive timeout=5, max=100
Transfer-Encoding chunked
Content-Type application/json; charset=UTF-8
Connection keep-alive
Content-Encoding:
Cache-Control:
App Startup
Content-Encoding
JSON File: 267 KB
Content-Encoding
JSON File: 267 KB
Content-Encoding: gzip
JSON.gz: 42 KB 85% savings
Content-Encoding: br
JSON.br: 30 KB 89% savings
JSON Headers:Response
HTTP/1.1 200 OK
Date Sun, 28 Oct 2018 09:26:24 GMT
Server Apache
X-Robots-Tag noindex
X-Content-Type-Options nosniff
Access-Control-Expose-Headers X-WP-Total, X-WP-TotalPages
Access-Control-Allow-Headers Authorization, Content-Type
X-WP-Total 5222
X-WP-TotalPages 523
Link ; rel="next"
Allow GET
Keep-Alive timeout=5, max=100
Transfer-Encoding chunked
Content-Type application/json; charset=UTF-8
Connection keep-alive
Content-Encoding:
Cache-Control:
Cache- Control
App Startup
Thumbnail Images
Thumbnail Images
Thumbnail
470 KB
http://home.bt.com/news/news-extra/big-thumbs-up-for-trafalgar-squares-new-fourth-plinth-11364101681206
Thumbnail
470 KB
Little Thumbnail
470 KB
3 KB
Little Thumbnail
470 KB
3 KB
99.3%
smaller!!
Image Size
2.23 MB
4608 x 3456
Image Processing
2.3 MB
Image Processing
2.3 MB
16M pixels
Image Processing
2.3 MB
16M pixels 1M
pixels
Image Processing
2.3 MB
16M pixels 1M
pixels
Image Processing
2.3 MB
16M pixels 1M
pixels
Image Processing
1M
pixels
Download (s) Image Decode
(ms)
Desktop 14 78
Moto G4 14.2 218
Alcatel 1X 14.2 820
Optimising Your Images
• Size
• Quality
• Format
• Caching
• Lazy Loading
Optimising Your Images
• Size
• Quality
• Format
• Caching
• Lazy Loading
Image Size
220 KB
1400 x 1050
https://res.cloudinary.com/dougsillars/image/upload/w_1400/v1540978150/IMG_20181028_153301_okeb2b.jpg
Image Size
78 KB
800 x 600
https://res.cloudinary.com/dougsillars/image/upload/w_800/v1540978150/IMG_20181028_1
53301_okeb2b.jpg
What Sizes Are Optimal?
Check Your Analytics. See what screen sizes use your site the most,
and base images on these devices
Responsive Images
Image Processing (correctly sized)
1.5M
pixels
First Load (s) Image Decode
(ms)
Desktop 2.7 26
Moto G4 3.0 73
Alcatel 1X 3.1 123
Optimising Your Images
• Size
• Quality
• Format
• Caching
• Lazy Loading
Image Quality
Lossy compression
Removes pixels from
image losing
resolution
Google
recommends 85%
for web
Image Quality
Lossy compression
Removes pixels from
image losing
resolution
Image Quality
SSIM
Quality adjusted to
limit of human
perception
Image Quality
SSIM
Quality adjusted to
limit of human
perception
Image Quality
180 KB
1400 x 1050
SSIM Quality
https://res.cloudinary.com/dougsillars/image/upload/w_1400,q_auto/v1540978150/IMG_20181028_153301_okeb2b.jpg
Image Quality - SSIM
1.5M
pixels
First Load (s) Image Decode
(ms)
Desktop 2.7 35
Moto G4 2.8 123
Alcatel 1X 2.9 342
Optimising Your Images
• Size
• Quality
• Format
• Caching
• Lazy Loading
Top Image Formats
jpg, 17,047,941
png, 13,126,543
, 11,795,123
gif, 5,053,385
svg, 1,687,541
ico, 1,076,035
php, 644,839 jpeg, 442,705
webp, 159,089
aspx, 150,792
cnt
HTTP Archive 11/2018
Top Image Format Size
HTTP Archive 11/2018
WebP Support
11/03/2018
Image Format
161 KB
1400 x 1050
SSIM Quality
WebP
https://res.cloudinary.com/dougsillars/image/upload/w_1400,q_auto,f_auto/v1540978150/IMG_20181028_153301_okeb2b.j
Image Quality - WebP
1.5M
pixels
First Load (s) Image Decode (ms)
Desktop 2.6 42
Moto G4 2.7 153
Alcatel 1X 2.8 170
Fast and Beautiful:
1.5M
pixels
0
2
4
6
8
10
12
14
16
18
0
500
1000
1500
2000
2500
full resize q_auto webp
Top Image Format Size: SVG
HTTP Archive 11/2018
Scalable Vector Graphics (SVG)
Images drawn as shapes
infinitely scalable
XML - Can be added inline to HTML document
https://gist.github.com/hail2u/2884613?short_path=66a60ff
Scalable Vector Graphics (SVG)
Images drawn as shapes
infinitely scalable
XML - Can be added inline to HTML document
https://gist.github.com/hail2u/2884613?short_path=66a60ff
Optimising Your Images
• Size
• Quality
• Format
• Caching
• Lazy Loading
Scalable Vector Graphics (SVG)
Scalable Vector Graphics (SVG)
Scalable Vector Graphics (SVG)
KB
Original 946
Optimized 1
Scalable Vector Graphics (SVG)
KB
Original 946
Optimized 1
Scalable Vector Graphics (SVG)
KB
Original 946
Optimized 1
GZip 687 bytes
Scalable Vector Graphics (SVG)
KB
Original 946
Optimized 1
GZip 687 bytes
Brotli 525 bytes
Scalable Vector Graphics (SVG)
KB
Original 946
Optimized 1
GZip 687 bytes
Brotli 525 bytes
Scalable Vector Graphics (SVG)
<style >
.svgorange {
filter: invert(.5) sepia(1)
saturate(5) hue-rotate(5deg);
}
</style>
<img class="svgorange" src ="map-
marker-circle.svg">
https://medium.com/@union_io/swapping-fill-color-on-image-tag-svgs-using-css-filters-fa4818bf7ec6
Scalable Vector Graphics (SVG)
Caching
Caching
Caching
768 x 558
61 KB
768 x 480
31 KB
Optimising Your Images
• Size
• Quality
• Format
• Caching
• Lazy Loading
Lazy Loading
Lazy Loading
Lazy Loading: Experiments
Lazy Loading: Experiments
Optimising Your Images
• Size
• Quality
• Format
• Caching
• Lazy Loading – SVG Previews
Preview Images
Lazy Loading: Experiments
Optimizing Content Delivery
Preview Images
https://github.com/technopagan/sqip
Animated GIFs
Original MP4
1.4 MB
Animated GIFs
Animated GIFs
Animated GIF
3.8 MB
270% larger
Animated GIFs
Animated GIFs
MP4: 256 colors
247KB
93% smaller
Animated GIFs
Video Tags:
<video loop autoplay muted playsinline controls = "false” src="goats.mp4”/>
Video is not pre-loaded, will be last to download
Img tags are fast!
<picture>
<source type="video/mp4" srcset=”goats.mp4">
<source type="image/webp" srcset=”goats.webp">
<img src=”goats.gif">
</picture>
https://calendar.perfplanet.com/2017/animated-gif-without-the-gif/
Animated GIFs
Security – Leaking info to 3rd parties
• https://medium.com/free-code-camp/local-sheriff-watching-them-watching-us-
5eacf3eb00ca
Are your URLs to 3rd parties leaking PII?
Security – Leaking info to 3rd parties
• https://medium.com/free-code-camp/local-sheriff-watching-them-watching-us-
5eacf3eb00ca
Are your URLs to 3rd parties leaking PII?
Addendum: What Are Your Customers Saying?
Addendum: Lite Mode: Save-Data
Save-Data: on
Addendum: Lite Mode: Save-Data
Addendum: Save-Data
Addendum: Save-Data
Addendum: Save-Data
Addendum: Save-Data
q_auto -> q_auto:eco
180KB -> 135 KB
https://res.cloudinary.com/dougsillars/image/upload/w_1400,q_auto/v1540978150/IMG_20181028_153301_okeb2b.jpg
Addendum 2: Network Info
Addendum 2: Network Info
// Network type that browser uses
navigator.connection.type;
// Effective bandwidth estimate
navigator.connection.downlink
// Effective round-trip time estimate
navigator.connection.rtt
// Upper bound on the downlink speed of the first network hop
navigator.connection.downlinkMax
Addendum 2: Network Info
// Network type that browser uses
navigator.connection.type;
// Effective bandwidth estimate
navigator.connection.downlink
// Effective round-trip time estimate
navigator.connection.rtt
// Upper bound on the downlink speed of the first network hop
navigator.connection.downlinkMax
500 KBPS
Be Vigilant!
Continue Testing For Performance
Summary
Testing:
WebPageTest https://www.webpagetest.org
HttpArchive https://httparchive.org
Images:
ImageMagick https://www.imagemagick.org
SSIM https://github.com/technopagan/cjpeg-dssim
LazySizes https://github.com/aFarkas/lazysizes
Responsive Breakpoints http://www.responsivebreakpoints.com/
Cloudinary https://www.cloudinary.com
Tooling
Conclusion
Images Can Be Beautiful AND Fast
Love Building with Video and Images?
Media Developer Expert
mde-comm@cloudinary.com
Become a

More Related Content

PPTX
Qa fest kiev_when its just too slow
PPTX
Nl when its just too slow
PPTX
Nantes when its just too slow
PPTX
Mobius keynote
PPTX
Mot cph when its just too slow
PPTX
Threadneedle when its just too slow
PPTX
Testing Mobile App Performance MOT Edinburgh
POTX
Its timetostopstalling sw_mobile_bristol
Qa fest kiev_when its just too slow
Nl when its just too slow
Nantes when its just too slow
Mobius keynote
Mot cph when its just too slow
Threadneedle when its just too slow
Testing Mobile App Performance MOT Edinburgh
Its timetostopstalling sw_mobile_bristol

What's hot (20)

POTX
Its timetostopstalling barcelonajs
POTX
Its timetostopstalling swp_munich
PPTX
Its Time To Stop Stalling: Mobile App and Video Performance
POTX
Mobile App and Web Performance Testing
PPTX
Its timetostopstalling pentabar
POTX
Its timetostopstalling gdg_hamburg
POTX
GDG Leeds
POTX
Ministry of Testing Cork
POTX
Its Time To Stop Stalling BerlinDroid
POTX
Its timetostopstalling gdg_zurich
POTX
GDG Manchester
PPTX
London Web Performance Meetup: Performance for mortal companies
PPTX
Edi react fastandbeautiful
PDF
Performance automation 101 @LDNWebPerf MickMcGuinness
POTX
Its timetostopstalling gdg_bruxelles
POTX
Its timetostopstalling limerick
POTX
Mobile web perf Amsterdam Tech Tips
PPTX
Edi ux fastandbeautiful
POTX
Android Network Performance
PPTX
Fastandbeautiful porto
Its timetostopstalling barcelonajs
Its timetostopstalling swp_munich
Its Time To Stop Stalling: Mobile App and Video Performance
Mobile App and Web Performance Testing
Its timetostopstalling pentabar
Its timetostopstalling gdg_hamburg
GDG Leeds
Ministry of Testing Cork
Its Time To Stop Stalling BerlinDroid
Its timetostopstalling gdg_zurich
GDG Manchester
London Web Performance Meetup: Performance for mortal companies
Edi react fastandbeautiful
Performance automation 101 @LDNWebPerf MickMcGuinness
Its timetostopstalling gdg_bruxelles
Its timetostopstalling limerick
Mobile web perf Amsterdam Tech Tips
Edi ux fastandbeautiful
Android Network Performance
Fastandbeautiful porto
Ad

Similar to Belgrade when its just too slow (13)

PPTX
QA Fest 2019. Doug Sillars. It's just too Slow: Testing Mobile application pe...
 
POTX
Its timetostopstalling mot_paris
POTX
Its timetostopstalling gdgdusseldorf
PPTX
Ux connect london_fastandbeautiful
POTX
Its timetostopstalling gdg_dublin
POTX
Dublin Tech Talks
POTX
Its timetostopstalling mobilecologne
POTX
Its Time To Stop Stalling Bucharest
PDF
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
POTX
Its time to stop stalling novi sad
PPTX
Imagesandvideo stockholm fastandbeautiful
PPTX
3 Tips for a better mobile User Experience
POTX
Its timetostopstalling cambridgemot
QA Fest 2019. Doug Sillars. It's just too Slow: Testing Mobile application pe...
 
Its timetostopstalling mot_paris
Its timetostopstalling gdgdusseldorf
Ux connect london_fastandbeautiful
Its timetostopstalling gdg_dublin
Dublin Tech Talks
Its timetostopstalling mobilecologne
Its Time To Stop Stalling Bucharest
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Its time to stop stalling novi sad
Imagesandvideo stockholm fastandbeautiful
3 Tips for a better mobile User Experience
Its timetostopstalling cambridgemot
Ad

More from Doug Sillars (20)

PPTX
Fastandbeautiful belfast
PPTX
Fastandbeautiful gdg sacremento
PPTX
Fastandbeautiful gd glittlerock
PPTX
Fastandbeautiful webinale
PPTX
Ai powered images-pythonljubjana
PPTX
Fastandbeautiful zagrebtechsauna
PPTX
Video js zagreb
PDF
Vkmdp cologne
PPTX
Ai powered images-gdgtirana
PPTX
A rt gallery pantalks
PPTX
Ai powered images-sarajevo
PPTX
A rt gallery hub387
PPTX
Ai powered images-zurichpydata
PPTX
Fastandbeautiful vienna
PPTX
Ai powered images-opieaivienna
PPTX
A rt gallery devfestlondon
PPTX
Fastandbeautiful devfest london
PPTX
A rt gallery cardiff
PPTX
Ai powered images-mobileera
PPTX
Fastandbeautiful oredev
Fastandbeautiful belfast
Fastandbeautiful gdg sacremento
Fastandbeautiful gd glittlerock
Fastandbeautiful webinale
Ai powered images-pythonljubjana
Fastandbeautiful zagrebtechsauna
Video js zagreb
Vkmdp cologne
Ai powered images-gdgtirana
A rt gallery pantalks
Ai powered images-sarajevo
A rt gallery hub387
Ai powered images-zurichpydata
Fastandbeautiful vienna
Ai powered images-opieaivienna
A rt gallery devfestlondon
Fastandbeautiful devfest london
A rt gallery cardiff
Ai powered images-mobileera
Fastandbeautiful oredev

Recently uploaded (20)

PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
KodekX | Application Modernization Development
 
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Big Data Technologies - Introduction.pptx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
 
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Encapsulation_ Review paper, used for researhc scholars
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Review of recent advances in non-invasive hemoglobin estimation
Agricultural_Statistics_at_a_Glance_2022_0.pdf
KodekX | Application Modernization Development
 
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Spectral efficient network and resource selection model in 5G networks
Reach Out and Touch Someone: Haptics and Empathic Computing
Advanced methodologies resolving dimensionality complications for autism neur...
Machine learning based COVID-19 study performance prediction
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Per capita expenditure prediction using model stacking based on satellite ima...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Big Data Technologies - Introduction.pptx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
 
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...

Belgrade when its just too slow

Editor's Notes

  • #85: 1149 bytes, 700 Zipped
  • #86: 1149 bytes, 700 Zipped
  • #88: 1149 bytes, 700 Zipped
  • #89: 1149 bytes, 700 Zipped
  • #90: 1149 bytes, 700 Zipped
  • #91: 1149 bytes, 700 Zipped
  • #92: 1149 bytes, 700 Zipped
  • #93: 1149 bytes, 700 Zipped
  • #94: 1149 bytes, 700 Zipped
  • #95: 1149 bytes, 700 Zipped
  • #96: 1149 bytes, 700 Zipped
  • #108: file:///Users/demo/Documents/reponsiveimages.html