From 181e585eb42ba027c84e6dc168bf997f4486d4fb Mon Sep 17 00:00:00 2001 From: "@permadeath.com" Date: Mon, 10 Aug 2026 21:44:39 -0400 Subject: [PATCH] docs(todo): the low-priority perf ledger Four items from the post-PvP perf review, none urgent: the raw stats stream moving to S3 beside the summary it already uploads, the watcher folding into the host JVM, an arm64 image for the Fargate discount, and the reconnection entry updated now that PvP is real and rejoining is the likeliest way a live match dies. Co-Authored-By: Claude Fable 5 --- TODO.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/TODO.md b/TODO.md index 2ad641a..df3a246 100644 --- a/TODO.md +++ b/TODO.md @@ -122,6 +122,33 @@ the finish is supposed to leave behind. - [ ] **Reconnection.** The host re-arms when a player drops, but Suramadu keeps the client JVM alive after the page closes, and the spike found that reconnecting to a live session is where things break. Untested here. + Now that PvP works end to end this is the likeliest way a real match + dies, but it stays low priority until a live match actually hits it — + the first report of a stuck rejoin is what makes it urgent. +- [ ] **The raw stats stream still floods CloudWatch.** finalize already + summarises the `stats,` lines into `stats-summary.txt` and uploads it, + but the lines themselves also go to stdout — 6,600 of them in the first + PvP match, most of the log group's volume and cost. Route the stats + logger to a file in the state dir, upload it under `diagnostics/` + beside the summary, and leave lifecycle lines as the only live stream. + The deterministic fetch already exists because artifacts are keyed by + match id; a ten-line `matches/artifacts.sh` in infra beside `logs.sh` + wraps it. Low priority: the uploaded summary already answers most + questions, this is about log cost and grep-ability. +- [ ] **The watcher could live in the host JVM.** MatchWatcher is a MegaMek + `Client` in a process of its own; Princess proves in-process clients + work. Folding it into MatchHost saves one JVM's boot and memory per + match and removes a moving part, and nothing depends on the + separation. Low priority — a quarter-GB and a few boot seconds per + match. If the "Princess in its own process" proposal ever lands, that + is the moment to reconsider both placements together. +- [ ] **An arm64 image would cut every Fargate match-hour by about 20%.** + Graviton pricing; the JDK and MegaMek run fine on aarch64 and the api + host is already Graviton, so the ground is familiar. versions.env pins + the x64 JDK archive and the Dockerfile follows it; an arm variant + needs its own pins, a build, and one live match to prove Suramadu's + native corners behave. Low priority until match volume makes the + compute line matter — the saving is a percentage of a small number. - [ ] **Structured turn reports.** `MatchWatcher` spools MegaMek's report strings verbatim, HTML and all — they are the Swing pane's presentation layer. The right seam is the `Report` objects behind them -- 2.51.2