Android Performance and Monitoring - Meetup 3 25-14

820 views

Published on

Android app performance optimization and performance monitoring.

Published in: Business
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
820
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
30
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Android Performance and Monitoring - Meetup 3 25-14

  1. 1. Bay Area Android Meetup How to Achieve Mobile App Performance and Monitoring to Ensure Great User Experiences 6:30pm: Food & Drinks 7:00pm: Performance Monitoring – Alex Gaber 7:40pm: Test Automation and CI – Melvin Laguren
  2. 2. Bay Area Android Meetup How to Achieve Mobile App Performance and Monitoring to Ensure Great User Experiences Crittercism 3-25-2014
  3. 3. Agenda • Why Does Android Performance Matter? • Snappy UI for UX Performance • UI Thread vs. Worker Thread • Android OS Install Base Fragmentation • Mashed Up Mobile Apps – 3rd Party APIs • Mobile Ad SDK performance • Security SDKs performance • MBaaS performance • Testing vs. Monitoring for Performance • Implementing Android App Monitoring
  4. 4. How Users React to Poor App Performance Source: Crittercism end-user survey Q4’2013 26% 9% 10% 21% 26% 65% 0% 10% 20% 30% 40% 50% 60% 70% Did not do anything Shared the experience via social media Left a negative review on the app store Contacted support or told the vendor Told a friend in person Uninstalled the app What Do Users Do When the App is Slow?
  5. 5. Personal Experience – Uninstalled Android Apps Lots of apps in the Google Play Store…….. ..….. and lots of uninstalls, 1 stars, bugs? HELP !!!
  6. 6. Agenda • Why Does Android Performance Matter? • Snappy UI for UX Performance • UI Thread vs. Worker Thread • Android OS Install Base Fragmentation • Mashed Up Mobile Apps – 3rd Party APIs • Mobile Ad SDK performance • Security SDKs performance • MBaaS performance • Testing vs. Monitoring for Performance • Implementing Android App Monitoring
  7. 7. Snappy UI Equals Great UX Linear Layout • Similar to nested tables in HTML • Great for quick and simple UI designs • Performance degrades as complexity increases Linear Layout
  8. 8. Snappy UI Equals Great UX Relative Layout • Eliminates Nested view groups • Keeps layout hierarchy flat • Much better performance for complex layouts
  9. 9. Relative Layout Example – activity_main.xml Relative Layout “button2” is below “button1”
  10. 10. Agenda • Why Does Android Performance Matter? • Snappy UI for UX Performance • UI Thread vs. Worker Thread • Android OS Install Base Fragmentation • Mashed Up Mobile Apps – 3rd Party APIs • Mobile Ad SDK performance • Security SDKs performance • MBaaS performance • Testing vs. Monitoring for Performance • Implementing Android App Monitoring
  11. 11. ANR – Application Not Responding What causes an “Application Not Responding” (ANR) error? • No response to an input event (such as key press or screen touch events) within 5 seconds (5,000 ms) • A BroadcastReceiver hasn't finished executing within 10 seconds (10,000 ms) Main Threads vs Worker Threads
  12. 12. Main Thread (UI Thread) • Main Thread is also called the “UI Thread” • All Android activities operate in the Main Thread by default • You can easily overload the Main Thread – Doing network operations on Main Thread – Slow disk operations (un-optimized SQL)
  13. 13. Main Thread (UI Thread) TIPS • Worker Threads are “background threads” • Handle all network calls w/ Worker Threads • Decouple the UI Thread from potential blockers Sample Worker Thread
  14. 14. Main Thread (UI Thread) Set Thread Priority: Example
  15. 15. Agenda • Why Does Android Performance Matter? • Snappy UI for UX Performance • UI Thread vs. Worker Thread • Android OS Install Base Fragmentation • Mashed Up Mobile Apps – 3rd Party APIs • Mobile Ad SDK performance • Security SDKs performance • MBaaS performance • Testing vs. Monitoring for Performance • Implementing Android App Monitoring
  16. 16. Android OS Install Base Fragmentation Over 20% of Android devices are still running an OS version below 4.0 Data collected during a 7-day period ending on March 3, 2014 (developer.android.com)
  17. 17. Agenda • Why Does Android Performance Matter? • Snappy UI for UX Performance • UI Thread vs. Worker Thread • Android OS Install Base Fragmentation • Mashed Up Mobile Apps – 3rd Party APIs • Mobile Ad SDK performance • Security SDKs performance • MBaaS performance • Testing vs. Monitoring for Performance • Implementing Android App Monitoring
  18. 18. Average Mobile App Consumes Five 3rd Party APIs • The average mobile app is using between 5-6 APIs / web services • API Monitoring from web server to web server does not tell the full story
  19. 19. Average Mobile App Consumes Five 3rd Party APIs
  20. 20. Agenda • Why Does Android Performance Matter? • Snappy UI for UX Performance • UI Thread vs. Worker Thread • Android OS Install Base Fragmentation • Mashed Up Mobile Apps – 3rd Party APIs • Mobile Ad SDK performance • Security SDKs performance • MBaaS performance • Testing vs. Monitoring for Performance • Implementing Android App Monitoring
  21. 21. 3rd Party SDK Overhead and Performance Latency • Mobile Ads SDKs
  22. 22. Agenda • Why Does Android Performance Matter? • Snappy UI for UX Performance • UI Thread vs. Worker Thread • Android OS Install Base Fragmentation • Mashed Up Mobile Apps – 3rd Party APIs • Mobile Ad SDK performance • Security SDKs performance • MBaaS performance • Testing vs. Monitoring for Performance • Implementing Android App Monitoring
  23. 23. 3rd Party SDK Overhead and Performance Latency • Security SDKs
  24. 24. 3rd Party SDK Overhead and Performance Latency What is that SDK adding to your app? • What is the performance overhead for this service? • What if they start to lag or get slow? • How can I monitor that this SDK isn’t making my app have performance issues?
  25. 25. Agenda • Why Does Android Performance Matter? • Snappy UI for UX Performance • UI Thread vs. Worker Thread • Android OS Install Base Fragmentation • Mashed Up Mobile Apps – 3rd Party APIs • Mobile Ad SDK performance • Security SDKs performance • MBaaS performance • Testing vs. Monitoring for Performance • Implementing Android App Monitoring
  26. 26. MBaaS Powering your Android App
  27. 27. Agenda • Why Does Android Performance Matter? • Snappy UI for UX Performance • UI Thread vs. Worker Thread • Android OS Install Base Fragmentation • Mashed Up Mobile Apps – 3rd Party APIs • Mobile Ad SDK performance • Security SDKs performance • MBaaS performance • Testing vs. Monitoring for Performance • Implementing Android App Monitoring
  28. 28. Testing Does Not Ensure Performance: Trust But Verify • Agile Mobile App Development methodology – Leaves little time for testing
  29. 29. Testing Does Not Ensure Performance: Trust But Verify • Agile Mobile App Development methodology – Leaves little time for testing
  30. 30. Agenda • Why Does Android Performance Matter? • Snappy UI for UX Performance • UI Thread vs. Worker Thread • Android OS Install Base Fragmentation • Mashed Up Mobile Apps – 3rd Party APIs • Mobile Ad SDK performance • Security SDKs performance • MBaaS performance • Testing vs. Monitoring for Performance • Implementing Android App Monitoring
  31. 31. Implementing Performance Monitoring for Android Failure of shopping cart check-outs, referrals, etc. Transaction Errors HTTP Errors like 404’s, Errors accessing Cloud Services API & Network Errors Slow performance, High latenciesUnresponsive Apps Downtime due to app crashes Apps Crashes & Exceptions Performance issues due to geographyLocation What cannot be tested prior to launch?
  32. 32. Implementing Performance Monitoring for Android DEMO
  33. 33. Testing Does Not Ensure Performance: Trust But Verify Thank You! www.crittercism.com @crittercism

×