Skip to content

webroot: request the app list first on boot - #28

Draft
ash-iir wants to merge 1 commit into
mainfrom
perf-boot-order
Draft

ash-iir wants to merge 1 commit into
mainfrom
perf-boot-order

Conversation

@ash-iir

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

Copy link
Copy Markdown
Owner

Performance. The manager exec bridge runs one call at a time (see the comment above deferredUpdateCheck), so the order calls are queued in is the order things load. On boot, list-apps (the first screen) was queued 12th, behind sanitize, the VDLU reads, dests-list, remote-list, pass-status, list-users, overview and list-ops.

  • loadUsers() and loadApps() return their promise (existing callers ignore the result).
  • After config-get and i18n, boot calls loadUsers() first. loadOverview, reattachOps, loadDests, loadSettings, recoverPendingAuth, deferredUpdateCheck and sanitize run once the app list request has settled, whether it succeeded or failed.

Boot call order (mock):

  • main: config-get, ping, sanitize, vdlu, dests-list, remote-list, pass-status, list-users, overview, list-ops, vdlu, list-apps, …
  • this branch: config-get, ping, vdlu, list-users, vdlu, list-apps, overview, list-ops, dests-list, remote-list, pass-status, sanitize, …

Trade-off: an op that was running when the WebUI opened gets its progress card back after the app list instead of before it.

Testing

  • Playwright mock harness, en and ar: call order as listed above, no page errors.
  • With each exec delayed 120 ms and run one at a time (to mimic the bridge) and 6x CPU throttle, 300 apps: time until the first app row appears goes from 1704-1718 ms to 872-885 ms.
  • Not tested on a rooted device. On a real phone each root exec usually takes longer than 120 ms, so the saving should be bigger.

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>
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