SlideShare a Scribd company logo
Android Application Optimization –
overview and Tools
Oren BarAd
Mobile Architect
AVG
2
Who?
• Developing for Android since 2008
• The first employee of DroidSecurity
– First company to release An antivirus to the Android
market (2009)
– Later acquired by AVG (2011)
• Mobile Architect @AVG
• B.Sc Information System Engineering from BGU
3
Agenda
• Why optimize?
• What to optimize?
• Tools and tips
4
Why Optimize?
• We want to be better
• Smaller footprint
• Better efficiency?
• Better user retention?
• Improvements!
5
What to optimize?
• We have limited resources
• Value/Cost
• User request/comments/help
• Analytics!
• Internal app metrics
– See previous talks
6
What needs to be optimized?
• Resources
• CPU
• RAM
• Storage – App size/local storage
• Network communications
• Battery
7
What needs to be optimized? cont.
• Design
• Cure the Feature-itis and remove bloat
• Remove unused features
• KISS
• User eXperience - UX
8
Optimize basics - the benchmark
• Create a metric
• Baseline
• Memory/CPU/Battery
• Devices
• OS matrix
• User comments/responses
9
Optimize The CPU usage - tools
• How to measure?
• top –m 5 –d 1 (-t)
Pros Cons
Very easy to use Measures are cumulative
Thread level usage Observer effect
10
Optimize The CPU usage - tools
• Identify the problem!
• MethodTracer
• Can be Collected from the Android Device
Monitor or from code
– Debug.StartMethodTrace()
11
Optimize The CPU usage
• The methodTracer tool can be very helpful!
12
Optimize The CPU usage
Pros Cons
Best tool Confusing
Background Logic Animation
Observer effect
• MethodTracer
13
Optimize The CPU usage
• Cross application interference
• ContentObserver
• System Service
• BroadcastReceiver
• Repeated events
14
Optimize The CPU usage - tips
• Use the CPU in a smart way
• Avoid work if possible
• Postpone
• Outside power
• Batch it
• Use Schedule
15
Optimize The Ram usage - tools
• How to measure?
• dumpsys meminfo [package name]
Pros Cons
Very easy to use Outside measure
No Observer effect
16
Optimize The Ram usage - tools
• Better details
• Heap Dump (hprof)
• Use the Android Device monitor, and MAT
Pros Cons
Very easy to dump Single point in time
No Observer effect Hard to analyze
17
Optimize The Ram usage - tools
• Allocation Tracer
• Use the Android Device monitor
Pros Cons
Identify allocations Confusing
Monitoring over time
18
Optimize The Network usage - tools
• How to measure?
• dumpsys netstats detail
– cat /proc/[pid]/net/dev
Pros Cons
Good info Very simplistic
No Observer effect
19
Optimize The Network usage - tools
• Better details
• TCPDUMP
– Or Fiddler
Pros Cons
Analyze using standard tool Unable to handle encryption
No Observer effect
20
Optimize The Network usage - tools
• Android Monitor Tool
• Use the Android Device monitor, and MAT
21
Optimize The Battery usage
• How to measure?
• dumpsys batterystats
– System settings
Pros Cons
General info Observer effect
Old OS issues
22
Reduce Apk size
• How to measure?
• unzip –l
• github.com/oba2cat3/parse_apk_size
• Reduce size of PNGs
• Compress the resources.arsc
• Remove unused code - ProGuard
23
Summary
• Do we need to optimize?
• What to optimize?
• What tools to use?
• Make Better Apps!
24
Q&A
• Questions?
• Contact: Oren.barad@avg.com
• We are hiring Android Developers!

More Related Content

PDF
Backend, Simplified - A sane look on the mobile backend world, Nir Orpaz, Mob...
PDF
Man in the Binder - Michael Shalyt & Idan Revivo, CheckPoint
PDF
APIdays Paris 2018 - Deliver API Updates in Real Time with Mercure.rocks Kévi...
PPTX
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
PDF
Censum - Garbage Collection Log Analyser
PDF
Automate it with Azure Functions
PDF
Discover Microsoft's Cloud Automation Suite
PPTX
SenchaCon 2016: Developing and Delivering Quality Code, Frequently - Neil Manvar
Backend, Simplified - A sane look on the mobile backend world, Nir Orpaz, Mob...
Man in the Binder - Michael Shalyt & Idan Revivo, CheckPoint
APIdays Paris 2018 - Deliver API Updates in Real Time with Mercure.rocks Kévi...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
Censum - Garbage Collection Log Analyser
Automate it with Azure Functions
Discover Microsoft's Cloud Automation Suite
SenchaCon 2016: Developing and Delivering Quality Code, Frequently - Neil Manvar

What's hot (20)

PDF
Automate everything with PowerShell
PDF
From PowerShell Function to Serverless code with Azure Functions
PDF
Navigate around the edge with PowerShell
PDF
Create awesome Azure Functions with PowerShell
PDF
Go with the flow!
PDF
Automate it with Azure Functions
PDF
J-Spring 2017 - Microservices in action at the Dutch National Police
PDF
Continuous Delivery Amsterdam - Microservices in action at the Dutch National...
PPTX
Azure Batch and MPI
PPTX
MongoDB World 2018: Using Puppet, Ansible and Ops Manager to Create Your Own ...
PDF
Clovaを支える技術 機械学習配信基盤のご紹介
PDF
Automate yourself out of a job - Use ChatOps!
PDF
Careful - APIs Inside: Testing and Monitoring for App Development
PDF
Microsoft Flow and PowerShell combined to automate everything
PDF
Using Chat Automation - ChatOps
PDF
Using Microsoft Flow for IT Professionals
PPTX
NashTech - Azure Application Insights
PDF
Donald Ferguson - Old Programmers Can Learn New Tricks
PPTX
Webhooks with Azure Functions - Live 360 Conference
PDF
Secure your environment by automation
Automate everything with PowerShell
From PowerShell Function to Serverless code with Azure Functions
Navigate around the edge with PowerShell
Create awesome Azure Functions with PowerShell
Go with the flow!
Automate it with Azure Functions
J-Spring 2017 - Microservices in action at the Dutch National Police
Continuous Delivery Amsterdam - Microservices in action at the Dutch National...
Azure Batch and MPI
MongoDB World 2018: Using Puppet, Ansible and Ops Manager to Create Your Own ...
Clovaを支える技術 機械学習配信基盤のご紹介
Automate yourself out of a job - Use ChatOps!
Careful - APIs Inside: Testing and Monitoring for App Development
Microsoft Flow and PowerShell combined to automate everything
Using Chat Automation - ChatOps
Using Microsoft Flow for IT Professionals
NashTech - Azure Application Insights
Donald Ferguson - Old Programmers Can Learn New Tricks
Webhooks with Azure Functions - Live 360 Conference
Secure your environment by automation
Ad

Viewers also liked (18)

PDF
Mobile SDKs: Use with Caution - Ori Lentzitzky
PPTX
Will it run or will it not run? Background processes in Android 6 - Anna Lifs...
PDF
Intro to Dependency Injection - Or bar
PDF
Android is going to Go! - Android and goland - Almog Baku
PDF
Write code that writes code! A beginner's guide to Annotation Processing - Ja...
PPTX
Good Rules for Bad Apps - Shem magnezi
PDF
Cognitive interaction using Wearables - Eyal herman, IBM
PDF
Engineering Wunderlist for Android - Ceasr Valiente, 6Wunderkinder
PPTX
Tricks to Making a Realtime SurfaceView Actually Perform in Realtime - Maarte...
PDF
3 things every Android developer must know about Microsoft - Ido Volff, Micro...
PPTX
Creating killer apps powered by watson cognitive services - Ronen Siman-Tov, IBM
PDF
Context is Everything - Royi Benyossef
PPTX
Set it and forget it: Let the machine learn its job - Guy Baron, Vonage
PDF
Think Async: Understanding the Complexity of Multithreading - Avi Kabizon & A...
PDF
Knock knock! Who's there? Doze. - Yonatan Levin
PDF
Android Continuous Integration and Automation - Enrique Lopez Manas, Sixt
PPTX
Optimize your delivery and quality with the right release methodology and too...
PDF
Build an App with Blindfold - Britt Barak
Mobile SDKs: Use with Caution - Ori Lentzitzky
Will it run or will it not run? Background processes in Android 6 - Anna Lifs...
Intro to Dependency Injection - Or bar
Android is going to Go! - Android and goland - Almog Baku
Write code that writes code! A beginner's guide to Annotation Processing - Ja...
Good Rules for Bad Apps - Shem magnezi
Cognitive interaction using Wearables - Eyal herman, IBM
Engineering Wunderlist for Android - Ceasr Valiente, 6Wunderkinder
Tricks to Making a Realtime SurfaceView Actually Perform in Realtime - Maarte...
3 things every Android developer must know about Microsoft - Ido Volff, Micro...
Creating killer apps powered by watson cognitive services - Ronen Siman-Tov, IBM
Context is Everything - Royi Benyossef
Set it and forget it: Let the machine learn its job - Guy Baron, Vonage
Think Async: Understanding the Complexity of Multithreading - Avi Kabizon & A...
Knock knock! Who's there? Doze. - Yonatan Levin
Android Continuous Integration and Automation - Enrique Lopez Manas, Sixt
Optimize your delivery and quality with the right release methodology and too...
Build an App with Blindfold - Britt Barak
Ad

Similar to Android Application Optimization: Overview and Tools - Oref Barad, AVG (20)

PPTX
Optimisation and performance in Android
PDF
High Performance Android Apps Improve Ratings with Speed Optimizations and Te...
PDF
Thinking cpu & memory - DroidCon Paris 18 june 2013
PDF
Boosting Android App Performance with Background Threads
PDF
14 Tips On How To Improve Android App Performance
PPTX
Android Performance and Profiling Tips
PPTX
Optimizing Apps for Better Performance
PDF
Performance optimization for Android
PDF
Unblocking The Main Thread_ Solving ANRs and Frozen Frames.pdf
PPTX
Android Performance Tips & Tricks
PPTX
Сергей Жук "Android Performance Tips & Tricks"
PDF
Big Trouble in Little Networks, new and improved
PDF
Building for the Next Billion: An Android Developer's Guide
PPTX
[충격] 당신의 안드로이드 앱이 느린 이유가 있다??!
PDF
Big Trouble in Little Networks
PPT
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
PDF
Android performance optimization_guide_h1 2016
PPTX
How to do Memory Optimizations in Android
PPTX
Of Bytes, Cycles and Battery Life
PPTX
Android app performance
Optimisation and performance in Android
High Performance Android Apps Improve Ratings with Speed Optimizations and Te...
Thinking cpu & memory - DroidCon Paris 18 june 2013
Boosting Android App Performance with Background Threads
14 Tips On How To Improve Android App Performance
Android Performance and Profiling Tips
Optimizing Apps for Better Performance
Performance optimization for Android
Unblocking The Main Thread_ Solving ANRs and Frozen Frames.pdf
Android Performance Tips & Tricks
Сергей Жук "Android Performance Tips & Tricks"
Big Trouble in Little Networks, new and improved
Building for the Next Billion: An Android Developer's Guide
[충격] 당신의 안드로이드 앱이 느린 이유가 있다??!
Big Trouble in Little Networks
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
Android performance optimization_guide_h1 2016
How to do Memory Optimizations in Android
Of Bytes, Cycles and Battery Life
Android app performance

More from DroidConTLV (20)

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

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Big Data Technologies - Introduction.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Approach and Philosophy of On baking technology
PDF
cuic standard and advanced reporting.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Spectroscopy.pptx food analysis technology
NewMind AI Weekly Chronicles - August'25 Week I
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Understanding_Digital_Forensics_Presentation.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
The AUB Centre for AI in Media Proposal.docx
sap open course for s4hana steps from ECC to s4
Review of recent advances in non-invasive hemoglobin estimation
Big Data Technologies - Introduction.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Per capita expenditure prediction using model stacking based on satellite ima...
MYSQL Presentation for SQL database connectivity
Encapsulation_ Review paper, used for researhc scholars
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Approach and Philosophy of On baking technology
cuic standard and advanced reporting.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Spectroscopy.pptx food analysis technology

Android Application Optimization: Overview and Tools - Oref Barad, AVG

  • 1. Android Application Optimization – overview and Tools Oren BarAd Mobile Architect AVG
  • 2. 2 Who? • Developing for Android since 2008 • The first employee of DroidSecurity – First company to release An antivirus to the Android market (2009) – Later acquired by AVG (2011) • Mobile Architect @AVG • B.Sc Information System Engineering from BGU
  • 3. 3 Agenda • Why optimize? • What to optimize? • Tools and tips
  • 4. 4 Why Optimize? • We want to be better • Smaller footprint • Better efficiency? • Better user retention? • Improvements!
  • 5. 5 What to optimize? • We have limited resources • Value/Cost • User request/comments/help • Analytics! • Internal app metrics – See previous talks
  • 6. 6 What needs to be optimized? • Resources • CPU • RAM • Storage – App size/local storage • Network communications • Battery
  • 7. 7 What needs to be optimized? cont. • Design • Cure the Feature-itis and remove bloat • Remove unused features • KISS • User eXperience - UX
  • 8. 8 Optimize basics - the benchmark • Create a metric • Baseline • Memory/CPU/Battery • Devices • OS matrix • User comments/responses
  • 9. 9 Optimize The CPU usage - tools • How to measure? • top –m 5 –d 1 (-t) Pros Cons Very easy to use Measures are cumulative Thread level usage Observer effect
  • 10. 10 Optimize The CPU usage - tools • Identify the problem! • MethodTracer • Can be Collected from the Android Device Monitor or from code – Debug.StartMethodTrace()
  • 11. 11 Optimize The CPU usage • The methodTracer tool can be very helpful!
  • 12. 12 Optimize The CPU usage Pros Cons Best tool Confusing Background Logic Animation Observer effect • MethodTracer
  • 13. 13 Optimize The CPU usage • Cross application interference • ContentObserver • System Service • BroadcastReceiver • Repeated events
  • 14. 14 Optimize The CPU usage - tips • Use the CPU in a smart way • Avoid work if possible • Postpone • Outside power • Batch it • Use Schedule
  • 15. 15 Optimize The Ram usage - tools • How to measure? • dumpsys meminfo [package name] Pros Cons Very easy to use Outside measure No Observer effect
  • 16. 16 Optimize The Ram usage - tools • Better details • Heap Dump (hprof) • Use the Android Device monitor, and MAT Pros Cons Very easy to dump Single point in time No Observer effect Hard to analyze
  • 17. 17 Optimize The Ram usage - tools • Allocation Tracer • Use the Android Device monitor Pros Cons Identify allocations Confusing Monitoring over time
  • 18. 18 Optimize The Network usage - tools • How to measure? • dumpsys netstats detail – cat /proc/[pid]/net/dev Pros Cons Good info Very simplistic No Observer effect
  • 19. 19 Optimize The Network usage - tools • Better details • TCPDUMP – Or Fiddler Pros Cons Analyze using standard tool Unable to handle encryption No Observer effect
  • 20. 20 Optimize The Network usage - tools • Android Monitor Tool • Use the Android Device monitor, and MAT
  • 21. 21 Optimize The Battery usage • How to measure? • dumpsys batterystats – System settings Pros Cons General info Observer effect Old OS issues
  • 22. 22 Reduce Apk size • How to measure? • unzip –l • github.com/oba2cat3/parse_apk_size • Reduce size of PNGs • Compress the resources.arsc • Remove unused code - ProGuard
  • 23. 23 Summary • Do we need to optimize? • What to optimize? • What tools to use? • Make Better Apps!
  • 24. 24 Q&A • Questions? • Contact: Oren.barad@avg.com • We are hiring Android Developers!