Member-only story
Improve Your App’s Performance With Profiler
Day nine of 100 days of code — performance matters

You, after working so hard on the application, don’t want to deliver a memory-intensive choppy app that heats up your user’s phone.
Before Android Studio 3.0, there were some monitoring tools available, along with the traditional logging. But, going through your code logging statements, and using the old tools, was not that helpful for the devs.
In comes the Android Profiler, which came with Android Studio 3.0. Developers can use it to monitor their CPU, memory, battery consumption, along with monitoring the network requests your app is making. And yes, you can still print log statements in the Logcat.
I was always busy learning and experimenting with the latest Android concepts and never got time to dig more into the Profiler. I knew it was there but always procrastinated to learn more about it, even though it’s such an important aspect of Android application development.
You can track the activity, the process that might be the root cause of the performance issues in your app.
Let’s See the Profiler
You need to have Android Studio 3.0 (at least) with the device (emulator works as well) with SDK level 26.

Once you launch your app, click on the Profiler tab on the bottom, which would be near Logcat. You will see a continuous chart like this, which is updated in real-time. It shows the activity running in the foreground on the top.
When you click on any of the graphs, you will see a detailed breakdown.
Running your app more, interacting, opening multiple activities, and doing network requests, you will observe these charts being updated which is really fun to watch.