Profiling android recyclerview grid gallery

In this review we spend time profiling android recyclerview grid gallery using the traceview, memory monitor & GPU render profiling tools.

android profiling recyclerview grid gallery

Executing android profiling tools on the android recyclerview grid gallery

Results

TRACEVIEW

android profiling trace view results recyclerviiew gallery

Android performance profiling results from the trace view tool on the android recyclerview grid gallery

From this chart we can observe that a android AsyncTask has been used to handle the bitmap loading which is not the best method for this type of application.

Note the gaps in the main thread which denotes that the user is waiting for the gallery to refresh while scrolling.

MEMORY MONITOR

android memory monitor recyclerview grid gallery

Android profiling results from the memory monitor on the recyclerview grid gallery.

Starts at consuming in the region of 13 MB, then after scrolling reaches a max in the region of 34 MB. After triggering a garbage collection (GC) the memory consumed drops down to 26 MB.

GPU RENDER

android GPU render recyclerview grid gallery

Android profiling results from the android devices’s GPU render tool

The key point to note here is the green horizontal line which represents 16 ms. Any frames that are higher than the horizontal green line can result in application jitter.

Get Application Code

If you would like to run these tests on your own hardware the code is available on github here

https://github.com/mobapptuts/recyclerview_image_gallery.git Tag inBitmap

Or else you can run this command

git clone — branch inBitmap https://github.com/mobapptuts/recyclerview_image_gallery.git

 

About The Author
-

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>