The Sessions page asked /api/speeds once a second while open, whether
or not the gateway had heard any session. On a resting page the list
is empty, and each ask woke magpie through the whole web middleware
chain. On mote with the real-account copy, a 60s CPU profile with the
Sessions page open measured 0.50-0.56s, against 0.22-0.29s on Home. An
alloc_space diff over 55s showed /api/speeds allocating next to
nothing (21.7MB in all, 79% of it /api/drift). So the cost was the
62 wake-ups a minute, not their garbage. Old main de13afbf6 measures
the same 0.50/0.56s, so this is no regression; the page always
cost it.
While the last answer was empty, the page now skips four ticks before
asking again. A session that starts is kept by the gateway (its curve
is the last 120s), so its speed shows within 5s with its whole curve.
Once any session has a speed, the page asks every second again.
Opening the page asks at once.
Test: sessions-speed-rest.test.cjs (every language, Chromium and
WebKit). A resting page reads at most once in 3.5s, a session heard
shows within the rest, and then the page reads once a second. On the
old client.js it is red, 5 of 5 in Chromium ("read 3 times in 3.5s
with nothing heard").