Repository navigation
Player Tracks/More open frame: keep and preload the underlay envelope, warm the root page at mount - #365
Merged
Conversation
…, preload it, warm the root page at mount The open frame of the player's Tracks/More popover cost 27-34 ms on the television: - `ulatch` (5.5-7.3 ms): the modal underlay re-latched the playing item's corner envelope (a 1920-texel reconstruction plus an upload) on every open, because `prune` reset the field on every close. A corner envelope is now kept dormant across the last dismissal, adopted by the next stack that asks for the same corners and dropped before anything reads it by any other; it is also latched on a presenting frame while nothing is open (`Screen::underlay_corners` -> `ModalUnderlay::preload` in `prepare_window`), so the first open of a playback pays nothing. The dim pass no longer touches the field for an empty stack, which would otherwise reset it every frame. - the root page's strings (`textx4`, 2-10.8 ms): a surface mounts after its frame's Tick fan-out was built, so its first `update` (which queues the prewarm walk) ran a frame late. The overlay's `prepare` now queues the root page (`warm_open`) on the mount frame, ahead of the presenting side's drain. - navcommit's unattributed remainder gets spans: dframe, dpre, dcommit, dpost, drecon, dhash, dprep, dsync, dstep, dafter, upre. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…velope, preload only at rest on an empty stack, stale note cleared, docs and tests Co-Authored-By: Claude Opus 5.5 <[email protected]>
…o it never lands on the playback-start frame Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 1, 2026
GLinnik21
added a commit
that referenced
this pull request
Oct 1, 2026
…lay preload debounce (#372) The underlay preload debounce from #365 was never wired: the dispatcher called want_corners directly, so the ~8 ms reconstruction latched on the first quiescent frame instead of waiting out the playback-start frames. The prepare pass now calls ModalUnderlay::note_at_rest once per pass; a note stands only after PRELOAD_REST_FRAMES consecutive passes at rest over the same envelope, and a changed envelope or a pass with nothing to note withdraws it. A test through Dispatcher::frame covers the call site. Simplifications over the #365 and #370 code, behaviour-preserving: ModalUnderlay::latch_corners replaces two copies of the corner latch, PanelMotion::warm_open replaces is_warm and the duplicated guard in the Tracks and More menus, and four items lose visibility they did not need. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the player sub-menus (#347, #352): the Tracks/More popover's OPEN frame cost 26–34 ms on the TV. It is now 18.7–19.3 ms.
What changed
ModalUnderlay::retire/wake/drop_dormant. Before, every open re-latched and re-uploaded the envelope (ulatch, 5.5–7.3 ms).Screen::underlay_corners(the player page) is noted inprepare_pass.ModalStack::preload_underlaylatches it from the presenting block.prepare_pass, so it cannot outlive its frame.TrackMenuState::warm_open/MoreMenuState::warm_openrun fromPlayerOverlayScreen::prepare(a speculative walk, drained byprepare_windowon a presenting frame). Before, they were queued a frame late, in the firstupdate.draw_scrims/draw_scrims_onreturn early for an empty stack. They used to reset the kept field every frame.dframe/dpre/dcommit/dpost/drecon/dhash/dprep/dsync/dstep/dafter/upre.The visible pass is unchanged: same field, same dim, same path. Canon, state hash and replay are untouched.
TV
60 Hz panel, guest + mock, screen on, muted.
total=18.7 … ulatch:0.0after.total=19.3 … ulatch:0.0after.upre, 5.7–7.2 ms) lands on one frame per playback (17.9 and 20.2 ms totals).dafter(focus seating on Enter) and the string drain.Tests
a_corner_latch_survives_the_last_dismissal_and_the_same_corners_keep_ita_kept_corner_field_never_leaks_into_a_different_stack_or_other_cornersan_empty_stacks_dim_pass_leaves_the_kept_envelope_alonea_noted_envelope_is_preloaded_for_the_first_open_and_never_over_a_live_fielda_dimless_player_panel_opening_and_closing_keeps_the_envelopethe_preload_waits_for_a_page_at_resta_stale_noted_envelope_is_not_preloaded_over_a_live_stacka_player_panel_presented_over_the_kept_field_adopts_it_through_the_dim_passwarm_opentests for Tracks and MoreGates on the committed tree (
4bbf97195):cargo test --lib:test result: ok. 5402 passed; 0 failed; 7 ignored--no-default-featurescheck: cleanmake: rc 0make check: rc 0 (5402/5479/102passed, 0 failed)🤖 Generated with Claude Code