Public: anyone can read this; the crew can change it.
Home's Server-Timing names its regions: feed, KPI row, pinned panels, shelf #3181
Check · Review · Land · Live done — Landed and live in production.
`/` now names its regions in `Server-Timing`, with `desc="hit"` on a phase whose cache answered. The new test and the existing home, route-timing and map-cache tests pass. I couldn't run the type check here (`bun x tsc` can't write to its temp dir and the `bun` types are missing), so the forge's check will be its first run.
shipped production is serving it deploy 4915f35
/ now names its regions in Server-Timing, with desc="hit" on a phase whose cache answered. The new test and the existing home, route-timing and map-cache tests pass. I couldn't run the type check here (bun x tsc can't write to its temp dir and the bun types are missing), so the forge's check will be its first run.
- Phases: a signed-in home records
feed,kpisandpanels. The anonymous door recordsshelf. - No phase for a hidden region:
kpisandpanelsare recorded only where the page renders them (admin, not the lean first-steps view). A non-admin getsfeedalone, and an anonymous visitor getsshelfalone. - Hit marking:
src/core/route_timing.tsgainstimePhaseandtimePhaseAsync. They mark a phase as a hit when the cache's hit count rose and its miss count didn't. Under concurrent requests a hit can be credited to the neighbouring request. feedscope: it times the whole region (ranking and rendering), with the candidate cache inside it.- Test:
test/home-timing.test.tschecks the three viewers and that a warm owner'skpisandfeedcarrydesc="hit". It also checks the header format for a hit and a miss. - Docs:
docs/CACHING.mdhas a "Where home's time goes" section with one run from the newbench/home-phases.ts. The owner's p50 and p95 areapp15.3 and 19.7 ms,feed7.1 and 10.0,kpis0.2 and 0.3,panels0.1 and 0.1.
Left out: the issue didn't ask for a session phase on /, so I didn't add one. The shelf phase wraps the front-page read and building the tiles, not the final render.
Try it: bun test test/home-timing.test.ts, or bun run bench/home-phases.ts to print the table. Or load / and read the Server-Timing response header.
Home now names feed, kpis, panels and shelf in Server-Timing, and only for regions the viewer is shown. A phase carries desc="hit" when its cache answered. Phase names are fixed tokens, no viewer text reaches the header, and the page markup is unchanged. That means no design-system, JS-off or phone impact. The tests cover owner, non-admin and anonymous viewers, a warm hit, and the header format. I could not curl the preview (403 from my sandbox) and judged from the source and the tests. Next two things: (1) studioDoor assigns tiles from inside the timePhase closure, so the shelf phase mixes a read with tile building. Return both from the closure, or time only frontPage, and drop the let. (2) The hit credit is read from shared cache counters and can go to a neighbouring request. The docs say so, but a per-call hit flag from Stamped.get would make it exact.
/now names its regions inServer-Timing, withdesc="hit"on a phase whose cache answered. The new test and the existing home, route-timing and map-cache tests pass. I couldn't run the type check here (bun x tsccan't write to its temp dir and thebuntypes are missing), so the forge's check will be its first run.feed,kpisandpanels. The anonymous door recordsshelf.kpisandpanelsare recorded only where the page renders them (admin, not the lean first-steps view). A non-admin getsfeedalone, and an anonymous visitor getsshelfalone.src/core/route_timing.tsgainstimePhaseandtimePhaseAsync. They mark a phase as a hit when the cache's hit count rose and its miss count didn't. Under concurrent requests a hit can be credited to the neighbouring request.feedscope: it times the whole region (ranking and rendering), with the candidate cache inside it.test/home-timing.test.tschecks the three viewers and that a warm owner'skpisandfeedcarrydesc="hit". It also checks the header format for a hit and a miss.docs/CACHING.mdhas a "Where home's time goes" section with one run from the newbench/home-phases.ts. The owner's p50 and p95 areapp15.3 and 19.7 ms,feed7.1 and 10.0,kpis0.2 and 0.3,panels0.1 and 0.1.Left out: the issue didn't ask for a
sessionphase on/, so I didn't add one. Theshelfphase wraps the front-page read and building the tiles, not the final render.Try it:
bun test test/home-timing.test.ts, orbun run bench/home-phases.tsto print the table. Or load/and read theServer-Timingresponse header.Closes #3160