Skip to content

perf(handheld): UI review quick wins (less rebuilding, caches, off-thread picker, a11y) - #101

Open
xservzeroman wants to merge 1 commit into
feat/device-appsfrom
perf/ui-quickwins
Open

xservzeroman wants to merge 1 commit into
feat/device-appsfrom
perf/ui-quickwins

Conversation

@xservzeroman

Copy link
Copy Markdown

First round of the UI review (handheld): faster and lighter, no change in look. From a code review of HandheldHomeActivity, Sw, QuickMenu, StatusCorner, DeviceApps, CustomArt.

Changelog

  • Settings sidebar: focus moving through the groups no longer rebuilds the whole screen at each step (debounced 160 ms, groupRender).
  • render() → renderPage(): allGames() is memoised for the duration of one render (it ran 3 times: Home row, wash, selected game).
  • DeviceApps: in-memory pinned list, info() cache, installed() cache, icon LRU (64); refresh() on resume drops them for installs/updates meanwhile. Caches used from the picker's worker thread are synchronized maps.
  • CustomArt: the set of keys with a picture is read from disk once (no per-tile SHA-1 + exists() per render); LRU sized in bytes (24 MB); colour per picture memoised.
  • Add apps: the list and icons load on a worker thread; the chips reuse them (showPicker()).
  • FocusGlide.pauseBreath()/resumeBreath(): the infinite breathing animator pauses in onPause.
  • The global focus and scroll listeners are added once per window (treeHooked), not again on every buildShell() (rotation, fold).
  • StatusCorner and the TV QuickMenu tick set text only when it changed.
  • L1/R1 tab cycling includes the dev tab; focus-ring radii for chip: and app:.
  • contentDescription on tiles, round buttons and Back.
  • Build: test253. Lint: 0 errors. Stacked on feat(handheld): On this device, pick Android apps to show next to PC, PS5 and Xbox #100.

Not in this PR (need a look first)

Bigger items from the review, listed in the PR thread: 48 dp touch targets and font scaling on phones, one shared row builder, one QuickMenu palette for both apps, a recycled All games grid, keeping scroll position across background redraws.

To test

  • Settings: hold Down through the groups: smooth, the list follows when focus rests.
  • Home ↔ All games ↔ Add apps feel snappier; tiles with pictures and app icons still show.
  • L1/R1 on All games reaches This .

🤖 Generated with Claude Code

…read picker, breath pause, a11y labels (test253)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants