* perf(mobile): back off spare page refills after an unclaimed drop or memory warning
* fix(mobile): skip a spare whose store read outlived an unclaimed drop
* fix(mobile): arm the spare refill timer on whole milliseconds
* perf(mobile): answer a page's ready that arrived before its bridge host
A page's ready can reach the shell before the screen has built its bridge
host (the host waits on the client and the host profile read). It used to
be dropped, so init waited for the page's next retry, up to 2 s later.
Keep the latest ready per session and answer it once the host exists.
* perf(mobile): keep one prewarmed page document while Home is shown
While native Home is on screen, boot one page document for the most
recently connected host with a cached build, parked invisibly in the
window. Opening a page from that build adopts it instead of building a
WebView, which removes the WebView start and script parse from the tap.
The spare is dropped when Home is left without a claim (2 s grace), on
background, memory pressure, its own failure and before the cache deletes
its files. It is never kept beside a shown page, and only phones with
more than 3 GiB of RAM (4 GB phones) get one. A parked page is told to
stop asking for init; the adopting view answers the ready it sent.
Builds on Jinwoo's spare pool and replay work in #32203 and #32204.
Co-authored-by: Jinwoo-H <73622457+Jinwoo-H@users.noreply.github.com>
* fix(mobile): unregister the shell's memory callbacks from the context that registered them
---------
Co-authored-by: Jinwoo-H <73622457+Jinwoo-H@users.noreply.github.com>