For: the sitemap lists every public repository (sitemapRepos, src/web/standards.ts:165), and it will grow as the explorer opens more. Today it answers with only the total app time (seen on production: server-timing: app;dur=1.8), so a slow sitemap cannot say whether the read or the XML is slow.
Done:
[ ] sitemapXml wraps sitemapRepos(ctx.app.db) in timePhase(ctx.request, "repos", …) and the XML join in timePhase(ctx.request, "render", …), as the other timed reads do (src/core/route_timing.ts).
[ ] A new test/sitemap-timing.test.ts makes two public repositories and one private one. It asserts both phase names in server-timing, and that the body lists the two public repositories and not the private one. The phase assertion fails without the change.
[ ] The body and content type are unchanged.
Files: src/web/standards.ts (this function only), test/sitemap-timing.test.ts.
Risk: #4109 (the sitemap lists /explore) edits the same function. Keep the change to the two wraps so either can land first.
For: the sitemap lists every public repository (
sitemapRepos, src/web/standards.ts:165), and it will grow as the explorer opens more. Today it answers with only the totalapptime (seen on production:server-timing: app;dur=1.8), so a slow sitemap cannot say whether the read or the XML is slow.Done:
sitemapXmlwrapssitemapRepos(ctx.app.db)intimePhase(ctx.request, "repos", …)and the XML join intimePhase(ctx.request, "render", …), as the other timed reads do (src/core/route_timing.ts).server-timing, and that the body lists the two public repositories and not the private one. The phase assertion fails without the change.Files: src/web/standards.ts (this function only), test/sitemap-timing.test.ts. Risk: #4109 (the sitemap lists /explore) edits the same function. Keep the change to the two wraps so either can land first.