No description
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. |
||
|---|---|---|
| .forgejo/workflows | ||
| .github | ||
| assets | ||
| bin | ||
| config | ||
| docs | ||
| k8s | ||
| lib | ||
| lib_ml | ||
| notebooks | ||
| priv | ||
| rel | ||
| rust/prop_grid_rs | ||
| scripts | ||
| test | ||
| vendor | ||
| .credo.exs | ||
| .dockerignore | ||
| .formatter.exs | ||
| .gitignore | ||
| .tool-versions | ||
| AGENTS.md | ||
| algo.md | ||
| app.json | ||
| CLAUDE.md | ||
| Dockerfile | ||
| elevation.md | ||
| mix.exs | ||
| mix.lock | ||
| prediction.md | ||
| README.md | ||
| tail_logs.sh | ||
| updates.md | ||
Microwaveprop
To start your Phoenix server:
- Run
mix setupto install and setup dependencies - Start Phoenix endpoint with
mix phx.serveror inside IEx withiex -S mix phx.server
Now you can visit localhost:4000 from your browser.
Ready to run in production? Please check our deployment guides.
Learn more
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix