SlideShare a Scribd company logo
1 of 24
Download to read offline
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

What's hot

What's hot (20)

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

Viewers also liked

Viewers also liked (18)

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

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

Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
IndicThreads
 

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

Application Performance Management
Application Performance ManagementApplication Performance Management
Application Performance Management
 
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
 
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
 
EVOLVE'15 | Maximize | Gary Gamitian | Informatica
EVOLVE'15 | Maximize | Gary Gamitian | InformaticaEVOLVE'15 | Maximize | Gary Gamitian | Informatica
EVOLVE'15 | Maximize | Gary Gamitian | Informatica
 
Maximize the Benefits from Your Test Automation Investment
Maximize the Benefits from Your Test Automation InvestmentMaximize the Benefits from Your Test Automation Investment
Maximize the Benefits from Your Test Automation Investment
 
Tools and best practices for sustainable software
Tools and best practices for sustainable softwareTools and best practices for sustainable software
Tools and best practices for sustainable software
 
Tools and best practices for sustainable software.pdf
Tools and best practices for sustainable software.pdfTools and best practices for sustainable software.pdf
Tools and best practices for sustainable software.pdf
 
Tools and best practices for sustainable software.pdf
Tools and best practices for sustainable software.pdfTools and best practices for sustainable software.pdf
Tools and best practices for sustainable software.pdf
 
Secure you
Secure you Secure you
Secure you
 
Simplify Troubleshooting With Context in Your Logs
Simplify Troubleshooting With Context in Your LogsSimplify Troubleshooting With Context in Your Logs
Simplify Troubleshooting With Context in Your Logs
 
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
 
Mobile apps that win
Mobile apps that winMobile apps that win
Mobile apps that win
 
Vehicle Detection using Camera
Vehicle Detection using CameraVehicle Detection using Camera
Vehicle Detection using Camera
 
Predictive Maintenance - Predict the Unpredictable
Predictive Maintenance - Predict the UnpredictablePredictive Maintenance - Predict the Unpredictable
Predictive Maintenance - Predict the Unpredictable
 
PRTG Network Monitor Presentation
PRTG Network Monitor PresentationPRTG Network Monitor Presentation
PRTG Network Monitor Presentation
 
Vehicle management system
Vehicle management systemVehicle management system
Vehicle management system
 
Vehicle management system
Vehicle management systemVehicle management system
Vehicle management system
 
Why we decided on RSA Security Analytics for network visibility
Why we decided on RSA Security Analytics for network visibilityWhy we decided on RSA Security Analytics for network visibility
Why we decided on RSA Security Analytics for network visibility
 
Aprenda mais sobre sua aplicação e seus usuários com Application Insights (DN...
Aprenda mais sobre sua aplicação e seus usuários com Application Insights (DN...Aprenda mais sobre sua aplicação e seus usuários com Application Insights (DN...
Aprenda mais sobre sua aplicação e seus usuários com Application Insights (DN...
 
Keeping IoT stack in quality check - meetup IoT Under Test
Keeping IoT stack in quality check  - meetup IoT Under TestKeeping IoT stack in quality check  - meetup IoT Under Test
Keeping IoT stack in quality check - meetup IoT Under Test
 

More from DroidConTLV

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

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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
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
 

Recently uploaded (20)

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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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?
 
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
 
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
 
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 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
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
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
 
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...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
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
 
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
 

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!