I am developing an application whose performance was poor, so I tried tracking methods. I found out that application performance has improved significantly by adding two statements at once.
android.os.Debug.startMethodTracing("MyTracing");
android.os.Debug.stopMethodTracing();
I think I understand what a method trace is, but I don’t understand why the performance improves significantly when I add these lines.
I am observing the same improvement by clicking the trace button of the start / stop method in the CPU-View of the Android monitor. There I will find out the decreasing workload of the kernel processor after stopping the method trace.
Can someone explain this behavior to me? Is there any other way to improve performance without using a method trace?
source
share