Ship a baseline profile, generated on the emulator because the phone cannot collect one
The profile is real: 13193 lines in app/src/main/baseline-prof.txt, 584 of them the app's own classes, bundled into the release APK as assets/dexopt/baseline.prof. It is produced by a new :baselineprofile test module that walks the first journey - roots screen, one volume opened - under the androidx.baselineprofile plugin, and :app now depends on androidx.profileinstaller so the bundled profile is applied at install time. Two device facts decided how it was made. Collection requires API 33+ (BaselineProfileRule refuses Android 12 outright), so it ran on the API 35 AVD that was already in ~/.android/avd; that emulator is software-rendered and needs androidx.benchmark.suppressErrors=EMULATOR for any macrobenchmark. And the release build needed profileable android:shell=true, which is why app/src/release/AndroidManifest.xml exists and says why: the same APK is both the thing measured and the thing shipped, so the profile's class names are the ones in the shipped dex. The effect is not measured, and PERFORMANCE.md says so: 7404 ms median without the profile against 9005 ms with it, run to run, because a TCG emulator varies by more than a profile can buy. What remains is one run on a physical API 33+ phone, with the two compile commands documented. The emulator did settle the other open question - FrameTimingMetric there reports frameDurationCpuMs and frameOverrunMs, the metrics this phone cannot produce at all. :baselineprofile is compiled by tools/verify.sh --release like :benchmark, so it cannot rot between device runs.
This commit is contained in:
+6
-4
@@ -67,10 +67,12 @@ would no longer have.
|
||||
Ordered by what it protects, not by what is fun. Nothing here is scheduled; the first two are what a
|
||||
release should not go out without.
|
||||
|
||||
1. **Baseline profile** — generate one, commit it, re-run `coldStart`, and publish the delta next to the
|
||||
532 ms figure in [PERFORMANCE](PERFORMANCE.md). This is the only item that makes the app measurably
|
||||
faster for everyone; it needs the `androidx.baselineprofile` plugin, which is not in the offline
|
||||
Gradle cache and so has to be fetched first.
|
||||
1. **Baseline profile** — **generated and committed**: `app/src/main/baseline-prof.txt` is bundled in the
|
||||
release APK, written by the `:baselineprofile` module. What remains is its *measurement*: collection
|
||||
needs a device with API 33+, and the phone is Android 12, while the API 35 emulator here is too noisy to
|
||||
resolve the delta. One run on a physical API 33+ device — `compile --reset` versus
|
||||
`compile -m speed-profile` — turns it from "bundled" into a number in
|
||||
[PERFORMANCE](PERFORMANCE.md).
|
||||
2. **Thumbnail hardening before the next release** — an explicit Coil `ImageLoader` with a decided cache
|
||||
policy and a placeholder, plus a large-folder device pass recorded in
|
||||
[EDGE_CASE_TESTING](EDGE_CASE_TESTING.md). The only item here that touches code changed late in 1.0.
|
||||
|
||||
Reference in New Issue
Block a user