android / performance-samples

Samples to show APIs and best practices in Performance on Android
https://d.android.com/topic/performance/overview
Apache License 2.0
1.25k stars 214 forks source link

Does Baseline Profile just helps with very First launch #252

Closed sbjoit1562 closed 11 months ago

sbjoit1562 commented 1 year ago

Hi Team, I know it is not an issue. But a rather confusion. Feel free to close this once you answer this. So, Baseline profile will just help with better TTID for very (first user app launch only + First App updated launch) or even after multiple cold launches(without data clearing). I know there is a cloud profile concept and device do conversion when device is idle.

Secondly, I uploaded my app on Internal Tracking. How can I check if profiles are being downloaded and installed after downloading app from Playstore.

Is there any log around it? I tried checking with "ProfileInstaller" but there was no logs for my package(after implementing baseline profiles) we tried uploading app to Internal Track but Macro benchmark was showing 29% imp. But QA report no improvement. Based on multiple forcestop->icon-click->wait for TTID iteration.

Is there any broadcast to trigger it? As we want our QA to test and declare the benefits without Macrobenchmark.

keyboardsurfer commented 11 months ago

These are a good hand full of questions.

So, Baseline profile will just help with better TTID for very (first user app launch only + First App updated launch) or even after multiple cold launches(without data clearing).

BP help to improve app startup AND runtime from the first start. Without a BP not everything along a path is JITed immediately. So the first and several subsequent executions of a path will be faster. Eventually JIT catches up with the BP.

Secondly, I uploaded my app on Internal Tracking. How can I check if profiles are being downloaded and installed after downloading app from Playstore.

The BP is being downloaded and installed from the internal testing track as well. If you want to make sure, use the ProfileVerifier API to see information from users. You can also use the manual inspection method described in the documentation to see if the BP is picked up correctly.

But QA report no improvement.

How are QA measuring these? If this is relying on manual testing, verification can be more challenging than when using automated frameworks such as macrobenchmark. Also, Firebase and Play Vitals will provide different data due to the measuring environment.

As we want our QA to test and declare the benefits without Macrobenchmark.

Check out the manual measuring approach