Skip to content

webui: faster boot and smoother scrolling - #23

Open
ash-iir wants to merge 5 commits into
VD171:mainfrom
ash-iir:up-performance
Open

ash-iir wants to merge 5 commits into
VD171:mainfrom
ash-iir:up-performance

Conversation

@ash-iir

@ash-iir ash-iir commented Nov 19, 2026 •

Copy link
Copy Markdown

What

WebUI performance and feel. Measured with the tools/screenshots mocks in headless Chromium at 412x915 with 6x CPU throttle and each exec delayed 120 ms and serialized, like the manager bridge. 300 apps, 150 backups:

  • first app row on screen: 1.7 s -> 0.88 s (app list requested before the calls only other tabs need)
  • DOM nodes after boot: 4660 -> 2260 (Settings app pickers built only while Settings is shown)
  • scroll frame time p95: 33-50 ms -> 16.7 ms (no backdrop-filter on the sticky bars)
  • backup list icons: 60 single calls -> 3 batched calls, loaded lazily (new backup-icons helper verb)
  • long-press on tabs, buttons and rows no longer selects text or opens the callout

One commit per fix, so any of them can be dropped on its own. Each line links the draft PR on my fork that has the full write-up and repro for that fix.

  • webroot: batch and lazy-load backup-list icons (details)
  • webroot: drop backdrop-filter from the sticky bars (scroll jank) (details)
  • webroot: build the Settings app pickers only while Settings is shown (details)
  • webroot: request the app list first on boot (details)
  • webroot: no text selection or callout on long-press of controls (details)

Checklist

  • The project banner header is present on every new/changed source file. (no new files)
  • Code and comments are in English; no em/en-dashes.
  • If a UI label changed, all lang/<code>.json and README.<code>.md were updated. (no UI label changes)
  • No real feature (SELinux/uid-gid/modes preservation, etc.) was weakened.
  • Commits are signed off (git commit -s).
  • Tested on a rooted device/emulator (note which). Not tested on a rooted device or emulator. Checked with sh -n, mksh -n, busybox sh -n and shellcheck -s sh (no new warnings), small mksh/busybox repro scripts per fix, and the tools/screenshots Playwright mocks (en and ar) for WebUI changes.

Notes

Desktop headless Chromium is not an Android WebView, so expect different numbers on a phone. With real root exec latency the boot-order gain should be larger.

The five grouped PRs (restore safety, scheduler, destinations, WebUI fixes, performance) merge cleanly together in any order; I checked that combining all of them gives the same tree as my test build.

The backup list started one backup-icon helper call per row on every
render (search keystroke, select toggle), and any failed call cached
"no icon" for that backup for good.

- New backup-icons helper verb: {refs:[...]} -> {ok, icons:{ref: b64
  or ""}}, one process per batch.
- Backup icons load through iconObserver like app icons, in batches of
  ICON_BATCH, with one in-flight request per ref.
- Only an answered ref is cached; "" caches as no icon, a failed call
  is retried on a later render.

Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com>
(cherry picked from commit d3fcf12)
A blur behind the sticky top bar and the fixed bottom tabs makes the
compositor re-blur what scrolls under them on every frame, which is the
main source of scroll stutter. Use the opaque page background instead
(the bars were already 86-90% opaque, so the look barely changes) and a
slightly darker scrim for modals.

Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com>
(cherry picked from commit 99a9b48)
loadApps rebuilt the Excluded apps and Per-app items pickers on every app
list load, so the full list was rendered three times on boot (and on
every refresh or user switch) while the Settings tab was hidden.
loadSettings already rebuilds both pickers when the tab opens; skip the
build while it is not shown.

Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com>
(cherry picked from commit 9f8134e)
The manager bridge runs one exec at a time, so call order is load order.
Boot queued sanitize, dests-list, remote-list, pass-status, overview and
list-ops ahead of list-apps, so the first screen waited behind calls
only other tabs need. loadUsers/loadApps now return their promise; the
other boot calls are queued once the app list request has settled.

Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com>
(cherry picked from commit 09bbbd1)
A long press on a tab, button or tappable row started a text selection
and the WebView callout menu, which is what makes the UI feel like a web
page. Turn off user-select and the touch callout on controls and row
labels, and set touch-action: manipulation on tappable elements. Text in
notices, dialogs and the log stays selectable.

Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com>
(cherry picked from commit c7d6687)
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.

1 participant