API hot spots under load: scheme list validation, review summary, recurrence horizon re-reading YAML #182
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
security
type/bug
type/chore
type/ci-cd
type/docs
type/feature
type/qa
v1.0.0
v1.1.0
v1.2.0
v2.0.0
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED#182
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From the py-spy profile taken while diagnosing #180. After fixing the N+1 settings read in
list_schemes(#180), the remaining costs under a CPU-limited (0.5 CPU) parallel E2E run were:list_schemespydantic validationselectin-loaded. Look at response-model validation cost (e.g.model_constructfor trusted ORM rows, or a lighter list schema).review_summaryplan_for_rangeon every banner render. Cache per (date, settings version, scheme revision), or at least share one planner across the request.get_recurrence_horizonProduction has far less concurrency than 8 E2E workers, so this is headroom, not an outage. But the calendar, banner and Settings page all hit these on every load, and a small host shares its CPU with other services.
Done when: each is measured before and after, the season-preview and watchdog E2E specs are stable at 0.5 CPU with 8 workers, and nothing changes in behaviour.