5 months ago
e3ee122- Swap modernc.org/sqlite for mattn/go-sqlite3 so aggregation runs in native C instead of a transpiled Go VM; Containerfile now builds with CGO and musl-dev. - Add a daily_peer_stats rollup (one row per peer per day) so /stats, /, and /api/countries aggregate over ~peers*days rows instead of the full 7-day checks window. RecordChecks upserts into it in the same tx; PruneOldChecks trims both tables; first boot backfills from existing checks. - Move per-connection pragmas into the DSN and bump cache_size to ~40 MB so hot pages stay resident; ANALYZE once after migrate. - Add Store.RefreshCaches, called from the checker after each run, so the expensive queries always execute on checker time and user requests hit a warm cache.
Parent20796fd