SlideShare ist ein Scribd-Unternehmen logo
1 von 118
Downloaden Sie, um offline zu lesen
Preparing your app for the next
billion internet users
Assaf Gelber
Droidcon Tel-Aviv 2017
Assaf Gelber
Facebook
Facebook Lite
You are all a very special
group of people
Kotlin VS API level 9
Why I'm here
• Convince you that you should care
• Explain why this is a hard problem
• Discuss high-level tips and directions
• Answer your questions
Agenda
• Why you should care
• Why it's hard
• What you can do about it
• Why you should care
• Why it's hard
• What you can do about it
Let's play a game!
• 1080x1920 pixel display
• 128 GB internal storage
• 4 GB RAM
• 8 core 2.35 GHz/1.9 GHz CPU
• $749
Google Pixel 2
Released: 2017
• 540x960 pixel display
• 16 GB internal storage
• 1 GB RAM
• 4 core 1.2 GHz CPU
• Around $250
Samsung Galaxy A3
Released: 2017
• 720x1280 pixel display
• 16 GB internal storage
• 2 GB RAM
• 4 core 1.3 GHz CPU
• Around $100
InFocus Turbo 5
Released: 2017
• 480x854 pixel display
• 4 GB internal storage
• 512 MB RAM
• 4 core 1.3 GHz CPU
• Around $42
Swipe Neo Power
Released: 2017
And they are here to stay
So how can we reason about
them?
Year class classification
In what year would this have
been a high-end device?
Google Pixel 2
Year class: 2015
Samsung Galaxy A3
Year class: 2011
InFocus Turbo 5
Year class: 2012
Swipe Neo Power
Year class: 2010
Let's look at data
Year class distribution in Africa
2009
2010
2011
2012
2013
2014
2015
Year class distribution in South America
2009
2010
2011
2012
2013
2014
2015
Year class distribution in Asia
2009
2010
2011
2012
2013
2014
2015
Year class distribution in Europe
2009
2010
2011
2012
2013
2014
2015
Year class distribution overall
2009
2010
2011
2012
2013
2014
2015
Over 50% of people worldwide
are on 2012 and under!
Let's look at networks
Percent of users on 2G networks
India
Africa
S. America
Middle East
Europe
N. America
77%
67%
38%
52%
26%
10%
Source: GSMA Intelligence - Global Mobile Trends 2017
36% are on 2G overall
Source: GSMA Intelligence - Global Mobile Trends 2017
But not all networks are
created equal
And not all data packages are
priced equal
Let's look at new users
Emerging markets will account
for over 90% of new mobile
subscribers globally by 2020
Source: GSMA Intelligence - Global Mobile Trends 2017
But do I reaaalllly need to
build for them?
Yes!
Yes! Well, kind of.
• Why you should care
• Why it's hard
• What you can do about it
• Old devices are old
• New devices are also old
Usage is completely different
• Turn off data when not in use
• Save content when on WiFi for later
• Install apps by sharing APKs over bluetooth
Design for new users
Let's play another game!
Round 2
Designing for new internet
users is hard
Designing for flaky networks
and devices is also hard
• Why you should care
• Why it's hard
• What you can do about it
One simple rule
1. Measure everything
Easy, right?
Allow me to expand
• APK size
• Storage and caches
• Runtime perf
• Network
Let's talk about Facebook Lite
Client ͍ Proxy ͍ Server
• Client connects to a proxy
• Proxy knows everything
• Proxy does everything
Client is very thin
• APK size
• Storage and caches
• Runtime perf
• Network
Quite easy to measure and
monitor
Important for a number of
reasons
• Mobile data availability
• Network failures
• Size on disk
Use these:
• ProGuard minification & dead code
• ReDex dex optimizing
• Resource shrinking
• Multiple APKs
Consider these:
• Vector drawables
• Downloadable fonts
• Alternative build systems
Facebook Lite?
Almost no resources in APK
No Optimizations 8.1 MB
With Optimizations 1.6 MB
• APK size
• Storage and caches
• Runtime perf
• Network
Measuring used to require ugly
hacks
StorageStatsManager solves
that in API 26 ¯_( )_/¯
Users are very aware of what is
on their device
• Make downloaded content easily clearable
• Be prepared for data to be cleared
• Sometimes server-side state makes sense
Facebook Lite?
• Proxy is aware of what the client saves
• Sends diffs when necessary
• Clears things that aren't necessary anymore
• APK size
• Storage and caches
• Runtime perf
• Network
Android GO!
Android Profiler is awesome
Systrace is awesome-er
Find the correct time to run
your code
Lazy loading is your friend
But not a silver bullet
Facebook Lite?
A lot of wins came from finding
the correct times to execute
• APK size
• Storage and caches
• Runtime perf
• Network
Measuring requires a bit of
effort
But it's possible
Usually easier from server
In most cases, images dominate
network traffic.
• Scale images to the required size
• Pick the correct image format
• Find the right time to send images
Size Weight
1280x960 325 KB
480x360 57 KB
82 percent less data!
Down to 36KB when converting
to high-quality WebP
Serialization is often
overlooked
• Don't use JSON
• Don't use JSON
• Don't use XML
Play around with network
situation emulators
Try Augmented Traffic Control if
you want more control
Facebook Lite?
• Very diligent about what we send
• Very diligent about when we send it
• Use custom protocol and compress it
Your mileage may vary, of
course
A
B
C
Always
Be
C Fine tuning
Be part of this growth and help
new internet users
Thank you!
Assaf Gelber
Droidcon Tel-Aviv 2017
Questions?
Assaf Gelber
Droidcon Tel-Aviv 2017

Weitere ähnliche Inhalte

Was ist angesagt? (6)

Smoothing the Continuous Delivery Path - A Tale of Two Teams
Smoothing the Continuous Delivery Path - A Tale of Two TeamsSmoothing the Continuous Delivery Path - A Tale of Two Teams
Smoothing the Continuous Delivery Path - A Tale of Two Teams
 
Walking the Tightrope: Balancing Bias to Action and Planning
Walking the Tightrope: Balancing Bias to Action and PlanningWalking the Tightrope: Balancing Bias to Action and Planning
Walking the Tightrope: Balancing Bias to Action and Planning
 
Move Fast;Stay Safe:Developing & Deploying the Netflix API
Move Fast;Stay Safe:Developing & Deploying the Netflix APIMove Fast;Stay Safe:Developing & Deploying the Netflix API
Move Fast;Stay Safe:Developing & Deploying the Netflix API
 
Messengers, Bots and Personal Assistants
Messengers, Bots and Personal AssistantsMessengers, Bots and Personal Assistants
Messengers, Bots and Personal Assistants
 
Signalr and wp8
Signalr and wp8Signalr and wp8
Signalr and wp8
 
The Importance of Data
The Importance of DataThe Importance of Data
The Importance of Data
 

Ähnlich wie Preparing your app for the next billion internet users - Assaf Gelber, Facebook

Top 10 Lessons Learned from the Netflix API - OSCON 2014
Top 10 Lessons Learned from the Netflix API - OSCON 2014Top 10 Lessons Learned from the Netflix API - OSCON 2014
Top 10 Lessons Learned from the Netflix API - OSCON 2014
Daniel Jacobson
 
Building Mobile Apps with HTML, CSS, and JavaScript
Building Mobile Apps with HTML, CSS, and JavaScriptBuilding Mobile Apps with HTML, CSS, and JavaScript
Building Mobile Apps with HTML, CSS, and JavaScript
Jonathan Stark
 

Ähnlich wie Preparing your app for the next billion internet users - Assaf Gelber, Facebook (20)

Optimizing your Apps for Emerging Markets
Optimizing your Apps for Emerging Markets Optimizing your Apps for Emerging Markets
Optimizing your Apps for Emerging Markets
 
Sidiq Permana - Building For The Next Billion Users
Sidiq Permana - Building For The Next Billion UsersSidiq Permana - Building For The Next Billion Users
Sidiq Permana - Building For The Next Billion Users
 
'It’s The Device, Stupid! - The Hidden Impacts of Performance on User Behavio...
'It’s The Device, Stupid! - The Hidden Impacts of Performance on User Behavio...'It’s The Device, Stupid! - The Hidden Impacts of Performance on User Behavio...
'It’s The Device, Stupid! - The Hidden Impacts of Performance on User Behavio...
 
DESIGN West 2013 Presentation: Accelerating Android Development and Delivery
DESIGN West 2013 Presentation: Accelerating Android Development and DeliveryDESIGN West 2013 Presentation: Accelerating Android Development and Delivery
DESIGN West 2013 Presentation: Accelerating Android Development and Delivery
 
Top 10 Lessons Learned from the Netflix API - OSCON 2014
Top 10 Lessons Learned from the Netflix API - OSCON 2014Top 10 Lessons Learned from the Netflix API - OSCON 2014
Top 10 Lessons Learned from the Netflix API - OSCON 2014
 
10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today
 
Get Connected Minehead 05.04
Get Connected Minehead 05.04Get Connected Minehead 05.04
Get Connected Minehead 05.04
 
Big Trouble in Little Networks, new and improved
Big Trouble in Little Networks, new and improvedBig Trouble in Little Networks, new and improved
Big Trouble in Little Networks, new and improved
 
Frontend performance metrics
Frontend performance metricsFrontend performance metrics
Frontend performance metrics
 
Building the Ultimate Device Matrix
Building the Ultimate Device MatrixBuilding the Ultimate Device Matrix
Building the Ultimate Device Matrix
 
Building Mobile Apps with HTML, CSS, and JavaScript
Building Mobile Apps with HTML, CSS, and JavaScriptBuilding Mobile Apps with HTML, CSS, and JavaScript
Building Mobile Apps with HTML, CSS, and JavaScript
 
Android games analysis final presentation
Android games analysis final presentationAndroid games analysis final presentation
Android games analysis final presentation
 
Customer Story: Elastic Stack을 이용한 게임 서비스 통합 로깅 플랫폼
Customer Story: Elastic Stack을 이용한 게임 서비스 통합 로깅 플랫폼Customer Story: Elastic Stack을 이용한 게임 서비스 통합 로깅 플랫폼
Customer Story: Elastic Stack을 이용한 게임 서비스 통합 로깅 플랫폼
 
Tmo ipv6-feb-2013 1361827441
Tmo ipv6-feb-2013 1361827441Tmo ipv6-feb-2013 1361827441
Tmo ipv6-feb-2013 1361827441
 
Google Glass 101 - A brief overview
Google Glass 101 - A brief overviewGoogle Glass 101 - A brief overview
Google Glass 101 - A brief overview
 
Global Cluster Topologies in MongoDB Atlas - Andrew Davidson
Global Cluster Topologies in MongoDB Atlas - Andrew DavidsonGlobal Cluster Topologies in MongoDB Atlas - Andrew Davidson
Global Cluster Topologies in MongoDB Atlas - Andrew Davidson
 
Optimize APK size
Optimize APK sizeOptimize APK size
Optimize APK size
 
Oreo android
Oreo androidOreo android
Oreo android
 
Netflix Recommender System : Big Data Case Study
Netflix Recommender System : Big Data Case StudyNetflix Recommender System : Big Data Case Study
Netflix Recommender System : Big Data Case Study
 
Kam Figy - Serialization 2.0 with Unicorn and Rainbow - SUGCON
Kam Figy - Serialization 2.0 with Unicorn and Rainbow - SUGCONKam Figy - Serialization 2.0 with Unicorn and Rainbow - SUGCON
Kam Figy - Serialization 2.0 with Unicorn and Rainbow - SUGCON
 

Mehr von DroidConTLV

Mehr von DroidConTLV (20)

Mobile Development in the Information Age - Yossi Elkrief, Nike
Mobile Development in the Information Age - Yossi Elkrief, NikeMobile Development in the Information Age - Yossi Elkrief, Nike
Mobile Development in the Information Age - Yossi Elkrief, Nike
 
Doing work in the background - Darryn Campbell, Zebra Technologies
Doing work in the background - Darryn Campbell, Zebra TechnologiesDoing work in the background - Darryn Campbell, Zebra Technologies
Doing work in the background - Darryn Campbell, Zebra Technologies
 
No more video loss - Alex Rivkin, Motorola Solutions
No more video loss - Alex Rivkin, Motorola SolutionsNo more video loss - Alex Rivkin, Motorola Solutions
No more video loss - Alex Rivkin, Motorola Solutions
 
Mobile at Scale: from startup to a big company - Dor Samet, Booking.com
Mobile at Scale: from startup to a big company - Dor Samet, Booking.comMobile at Scale: from startup to a big company - Dor Samet, Booking.com
Mobile at Scale: from startup to a big company - Dor Samet, Booking.com
 
LiveData on Steroids - Giora Shevach + Shahar Ben Moshe, Climacell
LiveData on Steroids - Giora Shevach + Shahar Ben Moshe, ClimacellLiveData on Steroids - Giora Shevach + Shahar Ben Moshe, Climacell
LiveData on Steroids - Giora Shevach + Shahar Ben Moshe, Climacell
 
MVVM In real life - Lea Cohen Tannoudji, Lightricks
MVVM In real life - Lea Cohen Tannoudji, LightricksMVVM In real life - Lea Cohen Tannoudji, Lightricks
MVVM In real life - Lea Cohen Tannoudji, Lightricks
 
Best Practices for Using Mobile SDKs - Lilach Wagner, SafeDK (AppLovin)
Best Practices for Using Mobile SDKs - Lilach Wagner, SafeDK (AppLovin)Best Practices for Using Mobile SDKs - Lilach Wagner, SafeDK (AppLovin)
Best Practices for Using Mobile SDKs - Lilach Wagner, SafeDK (AppLovin)
 
Building Apps with Flutter - Hillel Coren, Invoice Ninja
Building Apps with Flutter - Hillel Coren, Invoice NinjaBuilding Apps with Flutter - Hillel Coren, Invoice Ninja
Building Apps with Flutter - Hillel Coren, Invoice Ninja
 
New Android Project: The Most Important Decisions - Vasiliy Zukanov
New Android Project: The Most Important Decisions - Vasiliy ZukanovNew Android Project: The Most Important Decisions - Vasiliy Zukanov
New Android Project: The Most Important Decisions - Vasiliy Zukanov
 
Designing a Design System - Shai Mishali, Gett
Designing a Design System - Shai Mishali, GettDesigning a Design System - Shai Mishali, Gett
Designing a Design System - Shai Mishali, Gett
 
The Mighty Power of the Accessibility Service - Guy Griv, Pepper
The Mighty Power of the Accessibility Service - Guy Griv, PepperThe Mighty Power of the Accessibility Service - Guy Griv, Pepper
The Mighty Power of the Accessibility Service - Guy Griv, Pepper
 
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDevKotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
 
Flutter State Management - Moti Bartov, Tikal
Flutter State Management - Moti Bartov, TikalFlutter State Management - Moti Bartov, Tikal
Flutter State Management - Moti Bartov, Tikal
 
Reactive UI in android - Gil Goldzweig Goldbaum, 10bis
Reactive UI in android - Gil Goldzweig Goldbaum, 10bisReactive UI in android - Gil Goldzweig Goldbaum, 10bis
Reactive UI in android - Gil Goldzweig Goldbaum, 10bis
 
Fun with flutter animations - Divyanshu Bhargava, GoHighLevel
Fun with flutter animations - Divyanshu Bhargava, GoHighLevelFun with flutter animations - Divyanshu Bhargava, GoHighLevel
Fun with flutter animations - Divyanshu Bhargava, GoHighLevel
 
DroidconTLV 2019
DroidconTLV 2019DroidconTLV 2019
DroidconTLV 2019
 
Ok google, it's time to bot! - Hadar Franco, Albert + Stav Levi, Monday
Ok google, it's time to bot! - Hadar Franco, Albert + Stav Levi, MondayOk google, it's time to bot! - Hadar Franco, Albert + Stav Levi, Monday
Ok google, it's time to bot! - Hadar Franco, Albert + Stav Levi, Monday
 
Introduction to React Native - Lev Vidrak, Wix
Introduction to React Native - Lev Vidrak, WixIntroduction to React Native - Lev Vidrak, Wix
Introduction to React Native - Lev Vidrak, Wix
 
Bang-Bang, you have been hacked - Yonatan Levin, KolGene
Bang-Bang, you have been hacked - Yonatan Levin, KolGeneBang-Bang, you have been hacked - Yonatan Levin, KolGene
Bang-Bang, you have been hacked - Yonatan Levin, KolGene
 
Educating your app – adding ML edge to your apps - Maoz Tamir
Educating your app – adding ML edge to your apps - Maoz TamirEducating your app – adding ML edge to your apps - Maoz Tamir
Educating your app – adding ML edge to your apps - Maoz Tamir
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
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...
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 

Preparing your app for the next billion internet users - Assaf Gelber, Facebook