prop/lib
Graham McIntire bd3b1148a4
perf(map): collapse point_detail/forecast NFS I/O + silence /metrics logs
Clicks on the map were hanging for 1-3s, triggering the Phoenix topbar
progress bar visible to the user. Three hot-path improvements:

1. ScoresFile.read_point now uses a two-range :file.pread/2 — reads the
   33-byte header + one cell byte (~60 bytes) instead of the full ~93 KB
   file. point_forecast walks 19 forecast hours per click, so the old
   full-read path was the dominant cost on cold cache.

2. ProfilesFile.read/1 and list_valid_times/0 cached via
   Microwaveprop.Cache (5s TTL). Decoded profile maps are ~10 MB each
   (92k cells); timeline scrub that re-clicks the same valid_time
   within seconds now hits ETS instead of re-gunzipping + decoding.
   Cache keys include base_dir so test setup that swaps dirs doesn't
   see stale entries. Writes + prune + retain_window invalidate.

3. Endpoint log_level now filters /metrics the same way it already
   filters /health — Prometheus scrapes every 5s and was producing
   visible log spam.

Pod-local ETS is right for this workload (per-click read, tiny working
set); Valkey / shared memstore would not help here since each pod needs
its own fast-path lookup. File a follow-up if cross-pod score lookups
ever show up in flame graphs.
2026-04-20 16:30:16 -05:00
..
microwaveprop perf(map): collapse point_detail/forecast NFS I/O + silence /metrics logs 2026-04-20 16:30:16 -05:00
microwaveprop_web perf(map): collapse point_detail/forecast NFS I/O + silence /metrics logs 2026-04-20 16:30:16 -05:00
mix/tasks feat(grid-rs): Rust worker for HRRR f01..f18 propagation chain 2026-04-19 15:42:49 -05:00
microwaveprop.ex initial 2026-03-28 11:28:47 -05:00
microwaveprop_web.ex Merge auth links into main nav and lower password min to 8 2026-04-08 10:39:51 -05:00