SlideShare a Scribd company logo
1 of 43
Godfrey Nolan







Some Web History
Android Performance Tips
Android SDK Tools
Other Tools
Resources
Program Optimization Rules:
Rule 1: Don't do it.
Rule 2 (for experts only!): Don’t do it yet


Web Metric
95% of pages returned in a second or less





Optimize the slowest, most visited pages
10x performance increases not unusual
Wash, rinse, repeat






No metric yet
No log files
No time-taken token
Ideally…
Good load testing tool with activity time
Continuous Integration plugin available
Avoid creating unnecessary objects or memory
allocations
Avoid internal getters/setters
i = mCount not i = getCount()

Use Static/Final where appropriate
static final int intVal = 42; not static int intVal = 42;

Use floats judiciously
NDK calls
Views are expensive, flatten layouts, don’t inflate
Use standard libraries, enhanced for loop







Streamline your UI
Shrink your APK
Identify memory leakage issues
Profile your code
Measure performance in the field
Calabash Timings
Run 1
Run 2
Run 3

LinearLayout
3m42s
3m10s
3m16s

RelativeLayout
3m16s
3m7s
3m8s
Calabash Timings
Run 1
Run 2
Run 3

No Proguard
4m15s
4m7s
3m56s

Proguard
4m13s
3m47s
3m40s
Calabash Timings
Run 1
Run 2
Run 3

Before heap
4m57s
5m39s
4m55s

After heap
4m15s
4m7s
3m56s


SQLite
Explain plan is your friend
Use Indexes
Carefully craft your SQL



Web Services
Use log files to identify issues


DDMS
System Info
Heap Usage w/MAT
Memory Allocation
Threads



Traceview

Method Profiling within DDMS
Precise profiling using trace API









Systrace
Lint
Hierarchy Viewer
StrictMode
Unix commands
ARO
Crittercism


Leverage Unix performance commands
top 10
dump meminfo <pid>
procrank
http://developer.android.com/training/articles/perf-tips.html
http://www.youtube.com/watch?v=UApv-ZMJ51g
http://android-developers.blogspot.com/2009/11/optimize-your-layouts.html
http://developer.android.com/tools/debugging/debugging-ui.html
http://www.javaperformancetuning.com/tips/rawtips.shtml
http://software.intel.com/en-us/articles/performance-debugging-of-androidapplications/
http://developer.android.com/tools/debugging/debugging-tracing.html
http://android-developers.blogspot.com/2009_02_01_archive.html
http://bon-app-etit.blogspot.com/2013/03/using-traceview-for-betterperformance.html
http://www.sqlite.org/eqp.html
http://www.eclipse.org/mat/downloads.php
http://imgoptim.com
http://developer.att.com/developer/forward.jsp?passedItemId=13800072
http://www.devahead.com/blog/2011/12/coding-for-performance-and-avoidinggarbage-collection-in-android/




godfrey@riis.com
@riisllc

More Related Content

What's hot

Android Telephony Manager and SMS
Android Telephony Manager and SMSAndroid Telephony Manager and SMS
Android Telephony Manager and SMS
Jussi Pohjolainen
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation
洪 鹏发
 

What's hot (20)

Multimedia on android
Multimedia on androidMultimedia on android
Multimedia on android
 
Publishing and delivery of mobile application
Publishing and delivery of mobile applicationPublishing and delivery of mobile application
Publishing and delivery of mobile application
 
Android application development ppt
Android application development pptAndroid application development ppt
Android application development ppt
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
 
Android Telephony Manager and SMS
Android Telephony Manager and SMSAndroid Telephony Manager and SMS
Android Telephony Manager and SMS
 
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web DriverAutomation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation
 
Technology Stack
Technology StackTechnology Stack
Technology Stack
 
What is an API?
What is an API?What is an API?
What is an API?
 
Selenium
SeleniumSelenium
Selenium
 
Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture
 
Android activities & views
Android activities & viewsAndroid activities & views
Android activities & views
 
Api presentation
Api presentationApi presentation
Api presentation
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
 
Mobile Application Testing Strategy
Mobile Application Testing StrategyMobile Application Testing Strategy
Mobile Application Testing Strategy
 
Introduction to Android ppt
Introduction to Android pptIntroduction to Android ppt
Introduction to Android ppt
 
Introduction to fragments in android
Introduction to fragments in androidIntroduction to fragments in android
Introduction to fragments in android
 
Android Architecture.pptx
Android Architecture.pptxAndroid Architecture.pptx
Android Architecture.pptx
 
Android studio
Android studioAndroid studio
Android studio
 

Viewers also liked

Performance Testing on Android
Performance Testing on AndroidPerformance Testing on Android
Performance Testing on Android
Akshay Dashrath
 
Unit testing in android
Unit testing in androidUnit testing in android
Unit testing in android
Li-Wei Cheng
 
Android OS Presentation
Android OS PresentationAndroid OS Presentation
Android OS Presentation
hession25819
 
Android seminar-presentation
Android seminar-presentationAndroid seminar-presentation
Android seminar-presentation
connectshilpa
 

Viewers also liked (12)

Android Mobile Application Testing: Specific Functional, Performance, Device ...
Android Mobile Application Testing: Specific Functional, Performance, Device ...Android Mobile Application Testing: Specific Functional, Performance, Device ...
Android Mobile Application Testing: Specific Functional, Performance, Device ...
 
Performance Testing on Android
Performance Testing on AndroidPerformance Testing on Android
Performance Testing on Android
 
Android Performance and Monitoring - Meetup 3 25-14
Android Performance and Monitoring - Meetup 3 25-14Android Performance and Monitoring - Meetup 3 25-14
Android Performance and Monitoring - Meetup 3 25-14
 
Testing Android Security
Testing Android SecurityTesting Android Security
Testing Android Security
 
Unit testing in android
Unit testing in androidUnit testing in android
Unit testing in android
 
How to Reliably Measure and Optimize Graphics Performance of Your Android Games
How to Reliably Measure and Optimize Graphics Performance of Your Android GamesHow to Reliably Measure and Optimize Graphics Performance of Your Android Games
How to Reliably Measure and Optimize Graphics Performance of Your Android Games
 
Testing on Android
Testing on AndroidTesting on Android
Testing on Android
 
What is Android OS in ppt ?
What is Android OS in ppt ? What is Android OS in ppt ?
What is Android OS in ppt ?
 
Android OS Presentation
Android OS PresentationAndroid OS Presentation
Android OS Presentation
 
Android seminar-presentation
Android seminar-presentationAndroid seminar-presentation
Android seminar-presentation
 
Presentation on Android operating system
Presentation on Android operating systemPresentation on Android operating system
Presentation on Android operating system
 
Android ppt
Android ppt Android ppt
Android ppt
 

Similar to Android performance

Android Best Practices - Thoughts from the Trenches
Android Best Practices - Thoughts from the TrenchesAndroid Best Practices - Thoughts from the Trenches
Android Best Practices - Thoughts from the Trenches
Anuradha Weeraman
 
Gatling - Bordeaux JUG
Gatling - Bordeaux JUGGatling - Bordeaux JUG
Gatling - Bordeaux JUG
slandelle
 

Similar to Android performance (20)

Ajax Performance
Ajax PerformanceAjax Performance
Ajax Performance
 
Production debugging web applications
Production debugging web applicationsProduction debugging web applications
Production debugging web applications
 
Android Best Practices - Thoughts from the Trenches
Android Best Practices - Thoughts from the TrenchesAndroid Best Practices - Thoughts from the Trenches
Android Best Practices - Thoughts from the Trenches
 
Web Usability in the Enterprise with Ajax
Web Usability in the Enterprise with AjaxWeb Usability in the Enterprise with Ajax
Web Usability in the Enterprise with Ajax
 
Gatling - Bordeaux JUG
Gatling - Bordeaux JUGGatling - Bordeaux JUG
Gatling - Bordeaux JUG
 
Testing of React JS app
Testing of React JS appTesting of React JS app
Testing of React JS app
 
Ship code like a keptn
Ship code like a keptnShip code like a keptn
Ship code like a keptn
 
Lighthouse
LighthouseLighthouse
Lighthouse
 
JavaOne 2015: Top Performance Patterns Deep Dive
JavaOne 2015: Top Performance Patterns Deep DiveJavaOne 2015: Top Performance Patterns Deep Dive
JavaOne 2015: Top Performance Patterns Deep Dive
 
Selenium as a trend
Selenium as a trendSelenium as a trend
Selenium as a trend
 
Selenium as a trend
Selenium as a trendSelenium as a trend
Selenium as a trend
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
JUG Poznan - 2017.01.31
JUG Poznan - 2017.01.31 JUG Poznan - 2017.01.31
JUG Poznan - 2017.01.31
 
Browser core red bus presentation
Browser core red bus presentation Browser core red bus presentation
Browser core red bus presentation
 
Agile
AgileAgile
Agile
 
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
 
Balancing Technical Debt and Clean Code
Balancing Technical Debt and Clean CodeBalancing Technical Debt and Clean Code
Balancing Technical Debt and Clean Code
 
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
 
Product quality in agile project
Product quality in agile projectProduct quality in agile project
Product quality in agile project
 
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ..."Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
 

More from Godfrey Nolan

More from Godfrey Nolan (20)

Counting Cars with Drones
Counting Cars with DronesCounting Cars with Drones
Counting Cars with Drones
 
Customising QGroundControl
Customising QGroundControlCustomising QGroundControl
Customising QGroundControl
 
DJI Payload SDK
DJI Payload SDKDJI Payload SDK
DJI Payload SDK
 
Parrot Tutorials in Kotlin
Parrot Tutorials in KotlinParrot Tutorials in Kotlin
Parrot Tutorials in Kotlin
 
DJI Mobile SDK Tutorials in kotlin
DJI Mobile SDK Tutorials in kotlinDJI Mobile SDK Tutorials in kotlin
DJI Mobile SDK Tutorials in kotlin
 
Drone sdk showdown
Drone sdk showdownDrone sdk showdown
Drone sdk showdown
 
AI/ML in drones
AI/ML in dronesAI/ML in drones
AI/ML in drones
 
Getting started with tensor flow datasets
Getting started with tensor flow datasets Getting started with tensor flow datasets
Getting started with tensor flow datasets
 
Using ML to make your UI tests more robust
Using ML to make your UI tests more robustUsing ML to make your UI tests more robust
Using ML to make your UI tests more robust
 
Java best practices
Java best practicesJava best practices
Java best practices
 
Counting sheep with Drones and AI
Counting sheep with Drones and AICounting sheep with Drones and AI
Counting sheep with Drones and AI
 
Writing Secure Mobile Apps for Drones
Writing Secure Mobile Apps for DronesWriting Secure Mobile Apps for Drones
Writing Secure Mobile Apps for Drones
 
Android Device Labs
Android Device LabsAndroid Device Labs
Android Device Labs
 
The Day We Infected Ourselves with Ransomware
The Day We Infected Ourselves with RansomwareThe Day We Infected Ourselves with Ransomware
The Day We Infected Ourselves with Ransomware
 
Agile Android
Agile AndroidAgile Android
Agile Android
 
Agile Swift
Agile SwiftAgile Swift
Agile Swift
 
Android Refactoring
Android RefactoringAndroid Refactoring
Android Refactoring
 
Agile mobile
Agile mobileAgile mobile
Agile mobile
 
From Maps to Apps the Future of Drone Technology
From Maps to Apps the Future of Drone TechnologyFrom Maps to Apps the Future of Drone Technology
From Maps to Apps the Future of Drone Technology
 
Tableau 10 and quickbooks
Tableau 10 and quickbooksTableau 10 and quickbooks
Tableau 10 and quickbooks
 

Recently uploaded

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
 
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
 

Recently uploaded (20)

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...
 
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
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
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...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
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
 
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...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 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
 
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
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
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)
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
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
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 

Android performance