Smooth section switches and first row moves on weaker TVs
All checks were successful
Validate and publish Kaleido / android (push) Successful in 2m16s
All checks were successful
Validate and publish Kaleido / android (push) Successful in 2m16s
Measured every browse transition on the onn, a Fire TV Stick 4K and a TCL TV with a new framestats harness and atrace breakdowns. - Stage card artwork and titles a few cards per frame while a section enters, so its first frame no longer composes every card at once. - Give every discovery list the lookahead cache window and nudge it once after a section settles, so the first move down composes nothing. - Activate a focused top tab two frames later, so its highlight responds before the section switches; start the page entrance after composition settles, using per-draw alpha instead of an offscreen layer. - Limit Coil to two concurrent decodes, drop the redundant window background, size card image requests explicitly, and skip a coroutine per card for focus restoration. Home -> Movies UI stalls drop from 150-200 ms to 70-90 ms and Movies row moves no longer skip frames. Device scripts can now target any authorized serial and tolerate the TCL's flaky network ADB link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0f926c0435
commit
629546a50c
14 changed files with 282 additions and 30 deletions
|
|
@ -78,3 +78,29 @@ The cold-start splash was prototyped as a dp-accurate canvas page (ignored `evid
|
|||
Frame statistics from three profiled release cold starts (`dumpsys gfxinfo framestats`, bucketed per 250 ms) first showed 100–125 ms frames about 0.3–0.7 s after launch: startup data arriving and Home composing beneath the splash, with high UI-thread time. Starting the animation a few frames late did not avoid them because they follow the data, not the first frame. Skipping the hidden app's draw until the exit made no measurable difference and was reverted. The final sequence instead runs a 260 ms light-gathering phase on the nearly still closed iris, then holds until `busy` clears and four consecutive frames arrive within 24 ms (capped at 700 ms). On the final build every frame from the iris opening through the start of the exit completed within 25 ms in all three runs, at 15 frames per 250 ms. Frames after the reveal include Home itself and show higher latency without dropping below 15 frames per bucket. These are device samples, not a guarantee.
|
||||
|
||||
The hold adds roughly 0.5 s before the iris opens when Plex data takes that long; loading previously overlapped the animation. `Build.ps1 -Release -Test` passed; `repro_runtime.py sections` passed and all six `verify_ui.py browse` checks passed on the final release. A screen recording of the actual cold start (`kaleido-aperture-startup.mp4`, contact sheet `aperture-sheet.png`) was inspected. The optimized release was left on Home.
|
||||
|
||||
## Browsing transitions on three devices - 2026-10-24
|
||||
|
||||
The user authorized two weaker devices alongside the onn: a Fire TV Stick 4K (AFTKM, Fire OS 8 / Android 11, 32-bit, 1.7 GB) and a TCL Smart TV Pro (MT5896, Android 14, 1080p UI on a 4K panel, slowest GPU). Each was provisioned with `device.py seed` on a debug build, then the optimized release was installed over it with `speed-profile` compilation. `scripts/profile_transitions.py` measures skipped vsyncs and UI-thread time for each D-pad transition from `gfxinfo framestats`; its first cycle is the first pass after launch, and gaps after fast frames or longer than 300 ms count as idle. `scripts/trace_transition.py` breaks a transition's slow UI frames into their nested atrace slices.
|
||||
|
||||
Findings:
|
||||
|
||||
- Top-tab switches were the worst stall everywhere: about 30 ms disposing the old section, then one 150 ms+ measure pass composing every visible card (Coil painters about 3 ms per card, text layout about 1.4 ms per label), while four Coil decoders and a young GC competed for four cores.
|
||||
- Home's lookahead cache only fills after the list has scrolled, so the first hero → row move after launch composed the lower rows mid-animation. A screen recording on the onn showed a 204 ms freeze. Movies/TV had no cache window and skipped 1–2 frames on each row move.
|
||||
- The onn runs two accessibility services (Button Mapper, Luma launcher), adding 1–3 ms of Compose semantics work per frame. Its steady frames are render-bound but drop nothing. These device settings were not changed.
|
||||
- Converting contrast-baked backdrops to hardware bitmaps removed render-thread uploads but made the TCL's GPU skip 9–14 frames on Home row moves (0 with software bitmaps), so it was reverted. Explicit card image sizes and a staged-card build were also A/B tested.
|
||||
|
||||
Changes: staged card fill-in while a section enters, a cache window and one-time 1 px nudge on every discovery list, tab activation two frames after focus, the page entrance starting after composition settles with per-draw alpha, Coil decode parallelism 2, no redundant window background, explicit card image sizes, and no per-card restoration coroutine.
|
||||
|
||||
Results (skipped frames per cycle; UI-thread maximum):
|
||||
|
||||
| Transition | onn before → after | Fire Stick before → after |
|
||||
| --- | --- | --- |
|
||||
| Home → Movies | 11/7/8, 160 ms → 9/3/6/6, 88 ms | 12/5/5, 153 ms → 8/3/2/2, 69 ms |
|
||||
| Movies → Home | 7/6/5, 104 ms → 3/4/5/3, 67 ms | 4/3/4, 61 ms → 2/2/2/1, 52 ms |
|
||||
| Movies row → row | 2/2/1 → 0/0/0/0 | 1/1/0 → 0/0/0/0 |
|
||||
| Home hero/row moves | 0–1 per move, both before and after | 0 per move, both before and after |
|
||||
|
||||
On the TCL, Home → Movies measured 196 ms of UI time before and 88 ms in the one completed final sample. Its final full run was skipped at the user's request because its ADB link kept dropping; the partial final run and the A/B runs showed no regressions. Movies row ← row still skips two frames on the onn. Returning from Movies still disposes and composes whole sections. Retaining sections across tabs would remove that cost but needs per-section navigation state.
|
||||
|
||||
`Build.ps1 -Release -Test` passed. On the onn, all six `verify_ui.py browse` checks and `repro_runtime.py sections` passed. A recording confirmed the staged cards fill in under the fade without bound changes. The final release was left installed on all three devices. Private evidence: `transitions-*.json`, `transitions-*-frames.txt`, `trace-*.txt` and the `onn-*` recordings in `evidence/private/`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue