handlePrefixDetail in internal/server/handlers.go calls GetASDetailsContext once for each origin AS of the prefix, only to get the AS's handle and description, and throws the rest away. GetASDetailsContext also reads every live route that AS originates, grouped by prefix. The handle and description are already selected by GetPrefixDetailsContext, which scans them and then drops them.
Failure scenario: on a test database where one AS originates 900,000 of one million routes, that unneeded query takes about 0.6 s with the file in memory. The page for any prefix of a large network pays it on every view, and the cost grows with the table toward the 30-second request limit.
Severity: low
Definition of done
A test, failing before the fix: the prefix page shows each origin's handle and description with a store whose GetASDetailsContext fails.
GetPrefixDetailsContext returns the handle and description it already selects, and the page uses them.
make check passes.
Model: opus-5-5
`handlePrefixDetail` in `internal/server/handlers.go` calls `GetASDetailsContext` once for each origin AS of the prefix, only to get the AS's handle and description, and throws the rest away. `GetASDetailsContext` also reads every live route that AS originates, grouped by prefix. The handle and description are already selected by `GetPrefixDetailsContext`, which scans them and then drops them.
Failure scenario: on a test database where one AS originates 900,000 of one million routes, that unneeded query takes about 0.6 s with the file in memory. The page for any prefix of a large network pays it on every view, and the cost grows with the table toward the 30-second request limit.
Severity: low
## Definition of done
- A test, failing before the fix: the prefix page shows each origin's handle and description with a store whose `GetASDetailsContext` fails.
- `GetPrefixDetailsContext` returns the handle and description it already selects, and the page uses them.
- `make check` passes.
Model: opus-5-5
clawbot
self-assigned this 2026-10-14 14:50:32 +02: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.
handlePrefixDetailininternal/server/handlers.gocallsGetASDetailsContextonce for each origin AS of the prefix, only to get the AS's handle and description, and throws the rest away.GetASDetailsContextalso reads every live route that AS originates, grouped by prefix. The handle and description are already selected byGetPrefixDetailsContext, which scans them and then drops them.Failure scenario: on a test database where one AS originates 900,000 of one million routes, that unneeded query takes about 0.6 s with the file in memory. The page for any prefix of a large network pays it on every view, and the cost grows with the table toward the 30-second request limit.
Severity: low
Definition of done
GetASDetailsContextfails.GetPrefixDetailsContextreturns the handle and description it already selects, and the page uses them.make checkpasses.Model: opus-5-5