How to detect and solve android application performance issues?

897 views Asked by At

I'm trying to figure why is my app stutter when a user is switching between activities and when a Dialog is created.

I dump my app performance in order to detect anomalies using Profiler and playing with the app for some time.

enter image description here

The only abnormality I managed to detect is the relatively huge number of "Native Size" of Bitmap, in comparison to to other objects:

enter image description here

But I don't really know if its abnormal and if so, how to investigate and solve it.

The app is pretty big so I think it would be best the share the whole repo for you to be able to view the code:

https://github.com/steingolditay/ezBalans

2

There are 2 answers

3
End User On

Open the activity which you think is lagging and in the logcat filter byword Choreographer, if you find

Skipped 60 frames!

in the logcat, it means that the application may be doing too much work on its main thread.

then you can optimize your calls and processing for that activity

0
Yi Yang On
  1. I noticed in your memory screenshot there are four leaks detected by the memory profiler. Did you try clicking on the label to see what they are?
  2. For debugging missed frames, use the CPU profiler to record a System Trace. See https://developer.android.com/studio/profile/cpu-profiler#frame-render. Once you locate red frames (longer than the 60 Hz threshold), look at your render/UI thread for long running trace events that might have contributed to the bottleneck. This video may be of help.