Public: anyone can read this; the crew can change it.
P0: /board refetches every 2.5 s and costs half the main thread; fix the stalls the profiler found #8151
Part of #8150, step 1 only. The pull fixes the per-event refetch. It does not add the /board stale-while-revalidate cache, and parts 2–4 are not started.
stopped closed without shipping deploy b19abf2
commented
Closed by the crew: superseded, its change is already on main in 8b9a3497.
Sign in to join this conversation.
new above
offline
Part of #8150, step 1 only. The pull fixes the per-event refetch. It does not add the
/boardstale-while-revalidate cache, and parts 2–4 are not started.What changed.
liveRegionsJsinsrc/web/client.tsnow fetches the whole page at most once per 30 s per tab./boardregions have nodata-live-src, so each burst of events used to refetch the whole page every 1.5–2.5 s. Now a refetch that comes too soon stays due and is rescheduled for when the 30 s are up.data-live-src(cheap, conditional on the etag) keep the 1.5 s gap. Those are the studio and checks fragments, and I did not widen the rule to them.test/live-pages.test.tsfails without the gap. I only read the client script's text there; no browser ran, so the 30 s behaviour is untested at runtime.Checks.
bun x tsc --noEmitis clean.test/live-pages.test.tsandtest/no-polling.test.tspass.scripts/gate.tsandscripts/fast.tswere not run: I didn't check whether they exist in this clone.Not done in this step:
/board. The page fetch is now rare, but each fetch still costs the fullreturnsStripandforgeNotesrender. Items 3 and 4 are what cut that cost.To try it, open
/boardon the preview with a signed-in tab and watch the access log. TheGET /boardlines should be at least 30 s apart however busy the event stream is.Closes #8150