SlideShare a Scribd company logo
1 of 15
Download to read offline
Using SDKs? Here’s how they
could Slow your App Start Time
TABLE OF CONTENTS
App launch time definition
The onCreate complexity
Waiting for the other shoe to drop
The good, the bad and the unzipped
Check yourself before you wreck yourself
What should you do?
APP LAUNCH TIME DEFINITION
There is a time frame between the app’s class’s
onCreate and the launcher activity’s onStart.
onStart
(Opening
screen seen)
App launch time
onCreate
This time frame can be a few milliseconds
BUT…
It can also get to as much as several seconds!
THE onCreate COMPLEXITY
Most SDKs aim to be placed in the
application’s onCreate to get into gear
at the earliest possible time
However, those SDKs might block the main
UI, which forces your users to wait longer
without any indication that your app is
responding…
WAITING FOR THE OTHER SHOE TO DROP
The longest potential task is
pre-loading data from a server
Thankfully, Android doesn’t
allow network communication
on the main UI thread
WAITING FOR THE OTHER SHOE TO DROP
And still, Some SDKs make sure their
data has been received from the
server by waiting for a callback before
‘releasing’ the main thread back to
the application itself.
When the amount of work done by an SDK depends on network
connection, the best thing to do is NOT to place it in the onCreate
When the 65K limit was an issue, SDKs were trying to
avoid it by loading additional code during Runtime
Even though the 65K issue was resolved, some
SDKs never changed the way they work
THE GOOD, THE BAD AND THE UNZIPPED
The result: a long duration of app’s start time due to the
additional code loading
Real-life scenario:
The app code is only
responsible for a third of its
start time!
The rest is spent on SDKs.
Why?
SDKs unzip and load dex files
dynamically when the app is
launched
The following chart displays the distribution of an app start
time by its SDKs
THE GOOD, THE BAD AND THE UNZIPPED
CHECK YOURSELF BEFORE YOU WRECK YOURSELF
The following chart displays the same app’s start time
distribution, this time after several usages
Why did one SDK start time
shrink while another didn’t?
Look at the difference between
the Orange SDK and the Blue one
CHECK YOURSELF BEFORE YOU WRECK YOURSELF
The Orange SDK first checks if it has already unzipped the file.
If so, it only loads the dex file.
However, the Blue SDK unzips the file every single time the app is loaded.
EVERY SINGLE TIME….
1. Move the entire SDK’s
initialization code to a splash
screen or alike
WHAT SHOULD YOU DO?
SafeDK’s Marketplace is just the place
to look for the optimal SDK for you
Replace that SDK with a similar one
that offers the same functionality but
with less consequences to the user
experience.
WHAT SHOULD YOU DO?
2.
.
3. Not sure why it takes your app so long to
launch? Suspect it might be one of the 3rd
party tools you are using but not sure which?
Sign up for SafeDK’s In-App Protection and
get SDK-oriented live data and real time
alerts for any increase in SDK start time or
other issues.
WHAT SHOULD YOU DO?
THANK YOU!

More Related Content

Viewers also liked

TAIM WESER After Sales Service
TAIM WESER After Sales ServiceTAIM WESER After Sales Service
TAIM WESER After Sales Service
Antoine De Man
 
Biolight biolampy bioptron biostimul medilight
Biolight biolampy bioptron biostimul medilightBiolight biolampy bioptron biostimul medilight
Biolight biolampy bioptron biostimul medilight
Martin Pagac
 
El comercio electrónico y el fraude en la red
El comercio electrónico y el fraude en la redEl comercio electrónico y el fraude en la red
El comercio electrónico y el fraude en la red
aictur
 
Hombres Cuidense
Hombres  CuidenseHombres  Cuidense
Hombres Cuidense
Caro Lina
 
Supported characters
Supported charactersSupported characters
Supported characters
Hava_Top
 

Viewers also liked (20)

TAIM WESER After Sales Service
TAIM WESER After Sales ServiceTAIM WESER After Sales Service
TAIM WESER After Sales Service
 
Biolight biolampy bioptron biostimul medilight
Biolight biolampy bioptron biostimul medilightBiolight biolampy bioptron biostimul medilight
Biolight biolampy bioptron biostimul medilight
 
Programacion navidad en el soho
Programacion navidad en el sohoProgramacion navidad en el soho
Programacion navidad en el soho
 
Como cantar bien
Como cantar bienComo cantar bien
Como cantar bien
 
El comercio electrónico y el fraude en la red
El comercio electrónico y el fraude en la redEl comercio electrónico y el fraude en la red
El comercio electrónico y el fraude en la red
 
ITCandor ‘Expectations 2010’
ITCandor ‘Expectations 2010’ITCandor ‘Expectations 2010’
ITCandor ‘Expectations 2010’
 
Birja updated resume
Birja updated resumeBirja updated resume
Birja updated resume
 
Laumer Portfolio
Laumer PortfolioLaumer Portfolio
Laumer Portfolio
 
Vietnam Boletín Informativo Marzo 2010
Vietnam Boletín Informativo Marzo 2010Vietnam Boletín Informativo Marzo 2010
Vietnam Boletín Informativo Marzo 2010
 
badmintonadaptado
badmintonadaptadobadmintonadaptado
badmintonadaptado
 
Technical Article - 3M Art of Styling Steel
Technical Article - 3M Art of Styling SteelTechnical Article - 3M Art of Styling Steel
Technical Article - 3M Art of Styling Steel
 
SEO - SEA - Websiteanalyse - Social Media
SEO - SEA - Websiteanalyse - Social MediaSEO - SEA - Websiteanalyse - Social Media
SEO - SEA - Websiteanalyse - Social Media
 
Hombres Cuidense
Hombres  CuidenseHombres  Cuidense
Hombres Cuidense
 
CP-Basisstudie IV (2014)
CP-Basisstudie IV (2014)CP-Basisstudie IV (2014)
CP-Basisstudie IV (2014)
 
Reglamento de-heroes-of-the-storm-codegame
Reglamento de-heroes-of-the-storm-codegameReglamento de-heroes-of-the-storm-codegame
Reglamento de-heroes-of-the-storm-codegame
 
Laura vs Aristegui
Laura vs AristeguiLaura vs Aristegui
Laura vs Aristegui
 
23 setembre 2014 fundacio idiap jordi gol health consensus reduced
23 setembre 2014 fundacio idiap jordi gol health consensus reduced23 setembre 2014 fundacio idiap jordi gol health consensus reduced
23 setembre 2014 fundacio idiap jordi gol health consensus reduced
 
Sistemas de Información Geográfica Libres - Flisol 2016
Sistemas de Información Geográfica Libres - Flisol 2016Sistemas de Información Geográfica Libres - Flisol 2016
Sistemas de Información Geográfica Libres - Flisol 2016
 
Supported characters
Supported charactersSupported characters
Supported characters
 
Análisis de las fortalezas de los clústeres en Euskadi y Aquitania: una refle...
Análisis de las fortalezas de los clústeres en Euskadi y Aquitania: una refle...Análisis de las fortalezas de los clústeres en Euskadi y Aquitania: una refle...
Análisis de las fortalezas de los clústeres en Euskadi y Aquitania: una refle...
 

Similar to Using SDKs? Here’s How They Could Slow Your App Start Time

Similar to Using SDKs? Here’s How They Could Slow Your App Start Time (20)

Enough with the Mobile SDK Mess: A New Technology Is Born
Enough with the Mobile SDK Mess: A New Technology Is BornEnough with the Mobile SDK Mess: A New Technology Is Born
Enough with the Mobile SDK Mess: A New Technology Is Born
 
Mobile SDK: Considerations & Best Practices
Mobile SDK: Considerations & Best Practices Mobile SDK: Considerations & Best Practices
Mobile SDK: Considerations & Best Practices
 
Final NEWS.pdf
Final NEWS.pdfFinal NEWS.pdf
Final NEWS.pdf
 
Final NewsApp.pdf
Final NewsApp.pdfFinal NewsApp.pdf
Final NewsApp.pdf
 
Introduction to Docker and Containers- Learning Simple
Introduction to Docker and Containers- Learning SimpleIntroduction to Docker and Containers- Learning Simple
Introduction to Docker and Containers- Learning Simple
 
7+1 myths of the new os
7+1 myths of the new os7+1 myths of the new os
7+1 myths of the new os
 
Programming for-non-programmers
Programming for-non-programmersProgramming for-non-programmers
Programming for-non-programmers
 
Webinar on Google Android SDK
Webinar on Google Android SDKWebinar on Google Android SDK
Webinar on Google Android SDK
 
Getting Enter in Android development
Getting Enter in Android developmentGetting Enter in Android development
Getting Enter in Android development
 
Codename one
Codename oneCodename one
Codename one
 
MCE^3 - Scott Alexander-Bown - Android App Security on a Budget
MCE^3 - Scott Alexander-Bown - Android App Security on a BudgetMCE^3 - Scott Alexander-Bown - Android App Security on a Budget
MCE^3 - Scott Alexander-Bown - Android App Security on a Budget
 
Sdk technology
Sdk technologySdk technology
Sdk technology
 
Cloud Foundry a Developer's Perspective
Cloud Foundry a Developer's PerspectiveCloud Foundry a Developer's Perspective
Cloud Foundry a Developer's Perspective
 
Evolving to Cloud-Native - Nate Schutta (2/2)
Evolving to Cloud-Native - Nate Schutta (2/2)Evolving to Cloud-Native - Nate Schutta (2/2)
Evolving to Cloud-Native - Nate Schutta (2/2)
 
React Native: Is It Worth It? UA Mobile 2017.
React Native: Is It Worth It? UA Mobile 2017.React Native: Is It Worth It? UA Mobile 2017.
React Native: Is It Worth It? UA Mobile 2017.
 
Mobile testing android
Mobile testing   androidMobile testing   android
Mobile testing android
 
Platform Independent App design
Platform Independent App designPlatform Independent App design
Platform Independent App design
 
Hello Cloud
Hello CloudHello Cloud
Hello Cloud
 
How to Build a Hybrid App: A Detailed Outline
How to Build a Hybrid App: A Detailed Outline How to Build a Hybrid App: A Detailed Outline
How to Build a Hybrid App: A Detailed Outline
 
React Native App Development in 2023-Tips to Practice.pdf
React Native App Development in 2023-Tips to Practice.pdfReact Native App Development in 2023-Tips to Practice.pdf
React Native App Development in 2023-Tips to Practice.pdf
 

More from SafeDK

More from SafeDK (9)

How to work compliantly with 3rd parties
How to work compliantly with 3rd partiesHow to work compliantly with 3rd parties
How to work compliantly with 3rd parties
 
3 Tips to Help You Migrate to Android Studio 3.0
3 Tips to Help You Migrate to Android Studio 3.03 Tips to Help You Migrate to Android Studio 3.0
3 Tips to Help You Migrate to Android Studio 3.0
 
Mobile Apps Competitive Analysis Done Right
Mobile Apps Competitive Analysis Done RightMobile Apps Competitive Analysis Done Right
Mobile Apps Competitive Analysis Done Right
 
11 Top influencers in the mobile app development industry you just must follow
 11 Top influencers in the mobile app development industry you just must follow 11 Top influencers in the mobile app development industry you just must follow
11 Top influencers in the mobile app development industry you just must follow
 
What's New in Google Play's Developer's Policy
What's New in Google Play's Developer's PolicyWhat's New in Google Play's Developer's Policy
What's New in Google Play's Developer's Policy
 
The Hitchhiker’s Guide to StackOverflow
The Hitchhiker’s Guide to StackOverflowThe Hitchhiker’s Guide to StackOverflow
The Hitchhiker’s Guide to StackOverflow
 
Don’t Crash the Party: How to Ensure Your App’s Stability?
Don’t Crash the Party: How to Ensure Your App’s Stability?Don’t Crash the Party: How to Ensure Your App’s Stability?
Don’t Crash the Party: How to Ensure Your App’s Stability?
 
Serious About Your App Marketing? Here Are Your Must Have SDKs
Serious About Your App Marketing? Here Are Your Must Have SDKsSerious About Your App Marketing? Here Are Your Must Have SDKs
Serious About Your App Marketing? Here Are Your Must Have SDKs
 
5 Steps in Choosing the Right 3rd Party Tools (SDKs) for your Mobile App
5 Steps in Choosing the Right 3rd Party Tools (SDKs) for your Mobile App5 Steps in Choosing the Right 3rd Party Tools (SDKs) for your Mobile App
5 Steps in Choosing the Right 3rd Party Tools (SDKs) for your Mobile App
 

Recently uploaded

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
Earley Information Science
 
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
Enterprise Knowledge
 
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
 

Recently uploaded (20)

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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
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...
 
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...
 
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
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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...
 
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
 
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
 
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
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 

Using SDKs? Here’s How They Could Slow Your App Start Time

  • 1. Using SDKs? Here’s how they could Slow your App Start Time
  • 2. TABLE OF CONTENTS App launch time definition The onCreate complexity Waiting for the other shoe to drop The good, the bad and the unzipped Check yourself before you wreck yourself What should you do?
  • 3. APP LAUNCH TIME DEFINITION There is a time frame between the app’s class’s onCreate and the launcher activity’s onStart. onStart (Opening screen seen) App launch time onCreate
  • 4. This time frame can be a few milliseconds BUT… It can also get to as much as several seconds!
  • 5. THE onCreate COMPLEXITY Most SDKs aim to be placed in the application’s onCreate to get into gear at the earliest possible time However, those SDKs might block the main UI, which forces your users to wait longer without any indication that your app is responding…
  • 6. WAITING FOR THE OTHER SHOE TO DROP The longest potential task is pre-loading data from a server Thankfully, Android doesn’t allow network communication on the main UI thread
  • 7. WAITING FOR THE OTHER SHOE TO DROP And still, Some SDKs make sure their data has been received from the server by waiting for a callback before ‘releasing’ the main thread back to the application itself. When the amount of work done by an SDK depends on network connection, the best thing to do is NOT to place it in the onCreate
  • 8. When the 65K limit was an issue, SDKs were trying to avoid it by loading additional code during Runtime Even though the 65K issue was resolved, some SDKs never changed the way they work THE GOOD, THE BAD AND THE UNZIPPED The result: a long duration of app’s start time due to the additional code loading
  • 9. Real-life scenario: The app code is only responsible for a third of its start time! The rest is spent on SDKs. Why? SDKs unzip and load dex files dynamically when the app is launched The following chart displays the distribution of an app start time by its SDKs THE GOOD, THE BAD AND THE UNZIPPED
  • 10. CHECK YOURSELF BEFORE YOU WRECK YOURSELF The following chart displays the same app’s start time distribution, this time after several usages Why did one SDK start time shrink while another didn’t? Look at the difference between the Orange SDK and the Blue one
  • 11. CHECK YOURSELF BEFORE YOU WRECK YOURSELF The Orange SDK first checks if it has already unzipped the file. If so, it only loads the dex file. However, the Blue SDK unzips the file every single time the app is loaded. EVERY SINGLE TIME….
  • 12. 1. Move the entire SDK’s initialization code to a splash screen or alike WHAT SHOULD YOU DO?
  • 13. SafeDK’s Marketplace is just the place to look for the optimal SDK for you Replace that SDK with a similar one that offers the same functionality but with less consequences to the user experience. WHAT SHOULD YOU DO? 2.
  • 14. . 3. Not sure why it takes your app so long to launch? Suspect it might be one of the 3rd party tools you are using but not sure which? Sign up for SafeDK’s In-App Protection and get SDK-oriented live data and real time alerts for any increase in SDK start time or other issues. WHAT SHOULD YOU DO?