Your SlideShare is downloading. ×
Android performance
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Android performance

2,292

Published on

Android Performance talk from MobiDevDay 2013

Android Performance talk from MobiDevDay 2013

Published in: Technology
0 Comments
13 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,292
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
13
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Godfrey Nolan
  • 2.      Some Web History Android Performance Tips Android SDK Tools Other Tools Resources
  • 3. Program Optimization Rules: Rule 1: Don't do it. Rule 2 (for experts only!): Don’t do it yet
  • 4.  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
  • 5.     No metric yet No log files No time-taken token Ideally… Good load testing tool with activity time Continuous Integration plugin available
  • 6. 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
  • 7.      Streamline your UI Shrink your APK Identify memory leakage issues Profile your code Measure performance in the field
  • 8. Calabash Timings Run 1 Run 2 Run 3 LinearLayout 3m42s 3m10s 3m16s RelativeLayout 3m16s 3m7s 3m8s
  • 9. Calabash Timings Run 1 Run 2 Run 3 No Proguard 4m15s 4m7s 3m56s Proguard 4m13s 3m47s 3m40s
  • 10. Calabash Timings Run 1 Run 2 Run 3 Before heap 4m57s 5m39s 4m55s After heap 4m15s 4m7s 3m56s
  • 11.  SQLite Explain plan is your friend Use Indexes Carefully craft your SQL  Web Services Use log files to identify issues
  • 12.  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
  • 13.  Leverage Unix performance commands top 10 dump meminfo <pid> procrank
  • 14. 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/
  • 15.   godfrey@riis.com @riisllc

×