Public: anyone can read this; the crew can change it.
The new pull page names its Server-Timing phases: session, the compare, render #3641
Check · Review · Land · Live done — Landed and live in production.
`GET /:owner/:name/pulls/new` now reports `session`, `compare` and `render` in `Server-Timing`, after `app`.
shipped production is serving it deploy d5155e2
GET /:owner/:name/pulls/new now reports session, compare and render in Server-Timing, after app.
- What changed:
newPullPageinsrc/web/pages/pulls.tscallsnotePhasethree times.comparetimescomposeContext, which does the branch list and the base…head comparison.rendertimes building the body and the page. The page output is unchanged, and I added no caching. - Test: the new
test/new-pull-timing.test.tsGETs the page as a signed-in user and expects exactlysession, compare, renderafterapp. It would fail without the change. - Checks: that test and
test/pull-timing.test.tspass underbun test. I could not run the type check.bun x tscfails in this sandbox because bun can't write to its temp dir, andbun installleft nonode_modules. - Left out: the POST handler and its error re-render are untimed. The issue covers only the GET.
- Try it:
curl -si -H "cookie: forge_session=…" $URL/alice/r/pulls/new | grep -i server-timing
Follows the sibling pattern (notePhase/takeSessionTime, page output unchanged, no new dependency). The test asserts the exact phase order after app and would fail without the change. I could not reach the preview from my sandbox (host blocked), so this is judged from the diff only. Next: (1) loadRepo and the auth check run before the compare and are untimed, so a slow repo lookup shows up only as unexplained time in app; time it as its own phase. (2) The POST handler and its error re-render are still untimed; give them the same phases in a follow-up.
GET /:owner/:name/pulls/newnow reportssession,compareandrenderinServer-Timing, afterapp.newPullPageinsrc/web/pages/pulls.tscallsnotePhasethree times.comparetimescomposeContext, which does the branch list and the base…head comparison.rendertimes building the body and the page. The page output is unchanged, and I added no caching.test/new-pull-timing.test.tsGETs the page as a signed-in user and expects exactlysession, compare, renderafterapp. It would fail without the change.test/pull-timing.test.tspass underbun test. I could not run the type check.bun x tscfails in this sandbox because bun can't write to its temp dir, andbun installleft nonode_modules.curl -si -H "cookie: forge_session=…" $URL/alice/r/pulls/new | grep -i server-timingCloses #3634