You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the research performance panel — three low-risk hot-path fixes:
1. Health-check cycle committed one health event PER service (up to ~49 fsync'd
commits/cycle, 288 cycles/day). Collect the cycle's events and write them in a
single transaction via new database.record_health_events (one executemany + one
commit) — 27-98x fewer commits on the write-heaviest path.
2. PRAGMA synchronous=NORMAL in _get_db: durable in WAL across app crashes, skips an
fsync on every commit — a fleet-wide win on top of #1.
3. exchange_rates.refresh() fetched CoinGecko then Frankfurter sequentially, awaited
on the startup critical path (up to 30s worst case with two 15s timeouts). Fetch
both concurrently with asyncio.gather(return_exceptions) — halves the worst case
and makes one source's failure not discard the other's success.
Behavior-preserving. Tests: record_health_events batched write + empty no-op; the
health-check tests updated to the batched contract. Full suite 1173 green; ruff clean.
0 commit comments