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

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

opened this

Merged 38d 2h ago, live in production

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.

Notes

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.
Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs