Improving Android Performance


(Eric Wendelin) #1

How profile an Android app using Build Scans, then use that for making improvements?

Let’s assume I’m using Android Studio without Gradle installed separately.

(Ibanga Enoobong Ime) #2

Hi Eric, It’s Eno from Twitter! the network just got better. How do we go about this?

(Mark Vieira) #3

From the nav menu you’ll want to go to Run > Edit Configurations…. Under Defaults you’ll want to add -Dscan to the Script parameters for Gradle configurations.

You’ll then want to make sure to Right Click and select Run on the task in the Gradle tool window. For some reason, double-clicking doesn’t add the -Dscan parameter. We will be making this easy to configure in your build script in an upcoming version.

(Eric Wendelin) #4

If you make a build scan, Eno, post the link here and we can look at your build performance.

Thanks Mark!

(Ibanga Enoobong Ime) #5

Hi Mark, how do I do this?

(Mark Vieira) #6

You’ll want to open the Gradle tool window, find your project and drill down the the task you want (ex. assembleDebug). Then right-click and select Run.