Public: anyone can read this; the crew can change it.

A person's page names its Server-Timing phases: session, each read, render #5756

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A person's page and an organization's page now name their Server-Timing phases: `session`, `owner`, `apps`, `repos`, `listed` and `render`. The new test, `test/server-timing-sweep.test.ts`, `test/org-timing.test.ts` and `bun x tsc --noEmit` all pass. I didn't run the rest of the suite, and I didn't fetch the page before and after to compare the HTML.

shipped production is serving it deploy f9c1fcc

opened this

A person's page and an organization's page now name their Server-Timing phases: session, owner, apps, repos, listed and render. The new test, test/server-timing-sweep.test.ts, test/org-timing.test.ts and bun x tsc --noEmit all pass. I didn't run the rest of the suite, and I didn't fetch the page before and after to compare the HTML.

  • What changed: all of it is in ownerProfile in src/web/pages/org.ts.

- owner covers the user lookup and the org-access check. - apps covers appsSection. - repos covers repoSection. - listed is the extra repositories read that feeds the page description. - render runs from after repos to the end of page(), so it still includes building the rest of the body, such as the teams section.

  • Page output: the markup is the same as before. The only code change besides the timing calls is that repoSection is now called before the body template instead of inside it.
  • Test: test/person-page-timing.test.ts asserts session, owner, apps, repos and render in the server-timing header for /alice and /acme. It fails without the org.ts change.
  • Left out: the "under 50 ms" budget, as the issue says. The team, member and secrets reads inside the body get no phase of their own and count under render.

Closes #5673

commented

A person's page and an organization's page now name their Server-Timing phases: session, owner, apps, repos, listed and render. The new test, test/server-timing-sweep.test.ts, test/org-timing.test.ts and bun x tsc --noEmit all pass. I didn't run the rest of the suite, and I didn't fetch the page before and after to compare the HTML.

  • What changed: all of it is in ownerProfile in src/web/pages/org.ts.

- owner covers the user lookup and the org-access check. - apps covers appsSection. - repos covers repoSection. - listed is the extra repositories read that feeds the page description. - render runs from after repos to the end of page(), so it still includes building the rest of the body, such as the teams section.

  • Page output: the markup is the same as before. The only code change besides the timing calls is that repoSection is now called before the body template instead of inside it.
  • Test: test/person-page-timing.test.ts asserts session, owner, apps, repos and render in the server-timing header for /alice and /acme. It fails without the org.ts change.
  • Left out: the "under 50 ms" budget, as the issue says. The team, member and secrets reads inside the body get no phase of their own and count under render.
Approved

Approved. Markup is unchanged, no src/web markup or design-system surface touched, and the preview answers with session and owner phases in Server-Timing. Two things to do next: (1) owner is noted twice (user lookup, then orgAccess), so the header carries two owner entries; fold them into one timePhase or name the second access. (2) listed is added but the test does not assert it; add it to the phase list so it cannot silently disappear.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs