Status pages were slow for organizations with thousands of monitors: the editor, the group import, and the public page itself. uptimesebi-status.net/hetzner was 30 MB of uncompressed HTML.
Public status page
gzip: the status page server compresses text responses (HTML, CSS, JS, JSON, XML/RSS). New platform.Compress() middleware; it skips HEAD, 204, 304 and responses that are already encoded.
Paging: 50 components per page via ?page=N, with first/previous/next links and "Page x of y". Group headings keep the status and count of the whole group. Out-of-range pages show the last page. Single-file exports still list everything.
Search: pages with more than one page of components get a search box (?q=). It matches component and group names, and paging keeps the query.
Slim bars: rows that link a detail page draw their 90 bars as one <path> per status, without per-bar <title>. The detail page keeps the tooltips.
Paging: "Monitors on this page" shows 50 monitors at a time, with previous/next and an "x–y of n" status. All rows stay in the form, as saving replaces the page's monitors. "Add all" / "Remove all" still apply to every monitor the filter matches, across pages.
Smaller page: every row carried the options of all groups. Rows now carry only their own group and get the full option list from the row template when shown or focused. With 3500 monitors and 120 groups the editor went from 35 MB to 4.7 MB, and from 490 ms to 170 ms locally.
Filter fix: the filter searched the whole row, including the group names in the select, so a group name matched every ticked row. It now matches the monitor name and group path only.
Import:POST /org/statuspages/:id/groups/import updated each monitor in its own statement, 3500 round trips. It now creates the groups one nesting level at a time and files all monitors in one UPDATE … FROM unnest(…). Locally it went from 2.3–2.8 s to 0.3–0.7 s; in prod the gain is larger, because each round trip goes through HAProxy.
Test plan
New TestComponentPagingAndSearch covers pages, clamping, search by component and group name, no-match text, path bars, and the detail page keeping its tooltips.
New TestCompress covers gzip and q=0, *, small or binary bodies, and 304.
Full go test ./... passes. TestDispatchSpreadsRandomly failed once in the parallel run and passes three times on its own; it is unrelated.
New JS test internal/web/testdata/rowpager.html covers paging, the filter, check-all across pages, the rows of all pages being sent, and the lazy options.
TestStatusPages, TestStatusPageGroupsAndDetails and the other status page API tests pass.
Local perf run with 3500 monitors and 120 nested groups.
## Summary
Status pages were slow for organizations with thousands of monitors: the editor, the group import, and the public page itself. `uptimesebi-status.net/hetzner` was 30 MB of uncompressed HTML.
### Public status page
- **gzip:** the status page server compresses text responses (HTML, CSS, JS, JSON, XML/RSS). New `platform.Compress()` middleware; it skips HEAD, 204, 304 and responses that are already encoded.
- **Paging:** 50 components per page via `?page=N`, with first/previous/next links and "Page x of y". Group headings keep the status and count of the whole group. Out-of-range pages show the last page. Single-file exports still list everything.
- **Search:** pages with more than one page of components get a search box (`?q=`). It matches component and group names, and paging keeps the query.
- **Slim bars:** rows that link a detail page draw their 90 bars as one `<path>` per status, without per-bar `<title>`. The detail page keeps the tooltips.
- With 3128 components locally: **30 MB → 110 KB**, 3.3 KB gzipped.
### Editor and import
- **Paging:** "Monitors on this page" shows 50 monitors at a time, with previous/next and an "x–y of n" status. All rows stay in the form, as saving replaces the page's monitors. "Add all" / "Remove all" still apply to every monitor the filter matches, across pages.
- **Smaller page:** every row carried the options of all groups. Rows now carry only their own group and get the full option list from the row template when shown or focused. With 3500 monitors and 120 groups the editor went from 35 MB to 4.7 MB, and from 490 ms to 170 ms locally.
- **Filter fix:** the filter searched the whole row, including the group names in the select, so a group name matched every ticked row. It now matches the monitor name and group path only.
- **Import:** `POST /org/statuspages/:id/groups/import` updated each monitor in its own statement, 3500 round trips. It now creates the groups one nesting level at a time and files all monitors in one `UPDATE … FROM unnest(…)`. Locally it went from 2.3–2.8 s to 0.3–0.7 s; in prod the gain is larger, because each round trip goes through HAProxy.
## Test plan
- [x] New `TestComponentPagingAndSearch` covers pages, clamping, search by component and group name, no-match text, path bars, and the detail page keeping its tooltips.
- [x] New `TestCompress` covers gzip and q=0, `*`, small or binary bodies, and 304.
- [x] Full `go test ./...` passes. `TestDispatchSpreadsRandomly` failed once in the parallel run and passes three times on its own; it is unrelated.
- [x] New JS test `internal/web/testdata/rowpager.html` covers paging, the filter, check-all across pages, the rows of all pages being sent, and the lazy options.
- [x] `TestStatusPages`, `TestStatusPageGroupsAndDetails` and the other status page API tests pass.
- [x] Local perf run with 3500 monitors and 120 nested groups.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
With thousands of monitors on a status page the editor was tens of
megabytes, as every row carried the options of all groups, and
importing the monitor groups updated each monitor in its own statement.
- The monitors of the editor are shown 50 at a time. All rows stay in
the form, as saving replaces the page's monitors.
- Rows carry their own group only and get the other options from the
row template once shown or focused.
- The filter matches a monitor's name and group path only, no longer
the names of the groups in its select.
- The import creates the groups one nesting level at a time and files
all monitors in one statement.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
A status page with 3128 components was 30 MB of uncompressed HTML: all
components at once, each with 90 bars carrying a tooltip.
- The status page server gzips text responses.
- Status pages list 50 components at a time (?page=N) and offer a search
(?q=) over component and group names once they have more than one
page. Group headings keep the status and count of the whole group.
Single-file exports still list every component.
- Rows linking a detail page draw their bars as one path per status,
without tooltips; the detail page keeps them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
Sebi
changed title from perf(statuspages): page the monitor list and batch the group import to perf(statuspages): paging, search and gzip for large status pages2026-11-26 23:10:52 +00:00
Sebi
merged commit 965848017d into main2026-11-26 23:12:44 +00:00
Sebi
deleted branch perf/statuspage-editor-large-orgs2026-11-26 23:12:49 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Status pages were slow for organizations with thousands of monitors: the editor, the group import, and the public page itself.
uptimesebi-status.net/hetznerwas 30 MB of uncompressed HTML.Public status page
platform.Compress()middleware; it skips HEAD, 204, 304 and responses that are already encoded.?page=N, with first/previous/next links and "Page x of y". Group headings keep the status and count of the whole group. Out-of-range pages show the last page. Single-file exports still list everything.?q=). It matches component and group names, and paging keeps the query.<path>per status, without per-bar<title>. The detail page keeps the tooltips.Editor and import
POST /org/statuspages/:id/groups/importupdated each monitor in its own statement, 3500 round trips. It now creates the groups one nesting level at a time and files all monitors in oneUPDATE … FROM unnest(…). Locally it went from 2.3–2.8 s to 0.3–0.7 s; in prod the gain is larger, because each round trip goes through HAProxy.Test plan
TestComponentPagingAndSearchcovers pages, clamping, search by component and group name, no-match text, path bars, and the detail page keeping its tooltips.TestCompresscovers gzip and q=0,*, small or binary bodies, and 304.go test ./...passes.TestDispatchSpreadsRandomlyfailed once in the parallel run and passes three times on its own; it is unrelated.internal/web/testdata/rowpager.htmlcovers paging, the filter, check-all across pages, the rows of all pages being sent, and the lazy options.TestStatusPages,TestStatusPageGroupsAndDetailsand the other status page API tests pass.🤖 Generated with Claude Code
https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
perf(statuspages): page the monitor list and batch the group importto perf(statuspages): paging, search and gzip for large status pages