End sent in each of the first frames of a seek, and once Find holds its
match, must take the view to the latest message and leave it there. The
seek's frames now run while the browser's own scroll is still on its way: a
write of Find's or the timeline's in that time ended the scroll, and End did
nothing at all.
Find held its match for the rest of twelve frames after it scrolled there,
and revealed the match's row again when a late row pushed it out of the
mounted rows. A reader who scrolled away in that time unmounted the row too,
and Find took the view back: End reached the latest message, and the view
returned to a match 5,915px up.
- The reader's scroll ends the seek and the reveal it started. The timeline
tells Find through the call that ends the cursor's seek, for the inputs it
hears of: the wheel, touch, a pointer press, scroll keys and paging from
the composer.
- Ctrl+Home, a page key on a control in a row and the scrollbar send the
timeline no input event. So once Find has scrolled, a view that is neither
where Find put it nor where the match is now ends the seek too. That needs
no list of inputs.
- Find ends the timeline's own scroll to the match's row when it scrolls to
the match. That scroll stays alive for up to five seconds and took the view
back as well.
A seek probes on each of its frames, and each probe advanced the machine's
state, which was a signal. Solid marks everything downstream of a written
signal and checks it again, whether or not its value changed, so each of
about 150 probes in one search had every reader of Find re-evaluate.
The state is now a plain variable. Readers follow the view, a signal that is
written only when what Find shows changes, which a probe never does.
Counts for strobe's "find in session" case (17 keys, 120 matches), medians of
6 launches: the parent 16 probes and 143 ms of script; before this change 177
probes and 197 ms; with it 144 probes and 138 ms. Layouts (45) and scroll
writes (32) are the same in all three.
A seek now probes on every one of its 12 frames. Each probe read the text of every mounted row to find one match, which cost 35% to 39% more main-thread work in the find in session bench.
The session header renders beside the timeline's viewport, not inside it, so
code that looked for it there found nothing and used the viewport's own box.
- The quote action sat on the header and behind the composer region.
- A long question grew over the header.
- The Find bar of an open diff opened above the screen.
- The virtualizer read --session-header-height, which nothing sets. The
header is one 48px row.
Find in session lost its match in two more ways:
- It scrolled to the match in the first frame it rendered, and the reveal of
its row then moved the timeline on to the centre of the row. Find now
scrolls once the match rests in one place for a frame.
- A row above the match rendered its Markdown later and pushed the match
away, or out of the mounted rows. The seek now lasts its whole frame budget:
it scrolls again when the match rests in a new place, and reveals the row
again when the match is gone.
The warm-up of "pages the timeline from the composer and the transcript ..."
pressed PageUp once and waited for scrollTop to drop. With history that loads
before the reader reaches the top (#66033), that PageUp lands inside the
distance in which the next older page is requested. The page lands above the
view and raises scrollTop, so the offset goes 3,136 -> 2,386 -> 4,387 and the
wait never ends, although the view paged as it should.
The warm-up now uses the test's own `paged` helper and waits until the first
row below the header has moved down the screen, as the measured steps after it
already do.