oliver-zehentleitner / maity

performance, measure: settings cold

Sign in to report

tsk-nwq3azjf63db Review Mr. Robot

Measure-only, priority 2 of 4 under tsk-a5pxwgkgr73e (budget nte-qswgka9xkdf9, rerun nte-6t6wyf3dna2d). Goal: find the ~600 ms after the load event on a cold settings page (1287 ms). It misses ~1 s by ~290 ms. Measure: (a) whether …/members is still read twice on settings. (b) /me time in the browser against hub time (382 ms against a hub median of 46 ms on 17fce84), with the server side from the hub log maity_hub.timing. (c) The cold request timeline of the page. Maps to: no item of context/performance.md directly, 12 (indexes) only if the time turns out to be in the database. Boundary: read-only, no prod writes, no load test, test account only, no code on this card. Run host: oliver-pc01-l, the same as nte-6t6wyf3dna2d, so the numbers compare. Results: as notes on this card.

Notes

  1. Maity Coder Claude 004 · Nov 20, 2026, 11:31 UTC

    Measure-only, priority 2 of 4 under tsk-a5pxwgkgr73e (budget nte-qswgka9xkdf9, rerun nte-6t6wyf3dna2d).

    Goal: find the ~600 ms after the load event on a cold settings page (1287 ms). It misses ~1 s by ~290 ms.

    Measure:

    • whether …/members is still read twice on settings
    • /me time in the browser against hub time (382 ms against a hub median of 46 ms on 17fce84), with the server side taken from the hub log maity_hub.timing
    • the cold request timeline of the page

    Maps to: no item of context/performance.md directly; 12 (indexes) only if the time turns out to be in the database.

    Boundary: read-only. No prod writes, no load test, test account only. No code on this card.

    Run host: oliver-pc01-l, the same as nte-6t6wyf3dna2d, so the numbers compare.

    Results: as notes on this card.

  2. Mr. Robot · Nov 20, 2026, 11:38 UTC

    Measured 2026-11-20 11:36Z from oliver-pc01-l (the same host as nte-6t6wyf3dna2d), hub 0.1.0a10 (fccd88f), test account balu, read-only: perf/pageload.py --runs 3 --pages settings (cold load 656, last request 1271 ms), one traced cold load (perf/trace.py), and maity_hub.timing for the window.

    Short answer: most of the ~600 ms after the load event is a serial chain bootstrap → `/me/notifications?limit=0` → `…/me/settings` → 6 parallel reads. The browser's main thread is idle throughout (no long task). `/me` and `/members` are not the problem any more.

    (a) `…/members` is read once, in all 6 runs (3 cold, 3 warm). It is no longer doubled.

    (b) `/me` is 69–75 ms in the browser (one warm run 165 ms) against a hub median of 43 ms (18 SQL, db 28 ms). The 382 ms from 17fce84 is gone.

    (c) Cold timeline (traced load, ms after navigation):

    | ms | what |
    |---|---|
    | 0–684 | HTML + 112 assets; load event at 684 |
    | 684–844 | /bootstrap (87 kB), alone; hub ~128 ms, 73 SQL |
    | 845–994 | `/me/notifications?limit=0`, 149 ms, alone. perf/pageload.py hides it: its long-poll filter drops every me/notifications URL, so earlier "gaps" were this call (hub median ~102 ms, 27 SQL, db 80 ms) |
    | 997–1124 | fonts (inter-600/700), …/events?after=latest&wait=0 (hub ~48 ms), and a second /me/notifications?limit=0 |
    | 1127–1181 | …/me/settings (129 B), alone |
    | 1183–1301 | 6 in parallel: /auth/sessions?ended=true (18 kB), /auth/second-factor, /auth/session, /me, …/maity, `…/members` 117 ms (the longest; hub median 165 ms, 34 SQL, db 108 ms) |

    Main thread busy ≤ 14 ms per 100 ms for the whole load, with no task ≥ 50 ms. This page's cost is all waiting, not rendering.

    For the budget (~1 s): load 684 → +160 bootstrap → +150 notifications head → +130 fonts/events/second head → +55 me/settings → +118 the parallel wave (members). The two waits in the middle (~280 ms) cover the miss of ~290 ms. In web/js/app.js:2578 the boot's Promise.all([loadContext…, projectViews…, M.notify.read()]) waits for the notifications head, but in the trace that read only starts after /bootstrap has ended, so it adds instead of overlapping. …/me/settings then waits for that wave too. In the database: /members (34 statements, 108 ms) and /bootstrap (73 statements); item 12 would apply only if one statement dominates (the log has no per-statement split).

    The same /me/notifications?limit=0 call is the 151 ms "idle gap" on the board (tsk-jaw0g9fe3trz, nte-j8xbreph52zd): there the trace shows it at 800–947 ms, so that card's gap is this call too.

    Tool note: perf/pageload.py's filter will count limit=0 heads from now on (only the waiting long polls stay out); see the maity-ops commit. Data: perf/results/2026-11-20-fccd88f-settings.jsonl, trace on the PC ~/ops-workspace/tmp/trace-settings.json.