oliver-zehentleitner / maity

performance, measure: board and card cold tail

Sign in to report

tsk-jaw0g9fe3trz Review Mr. Robot

Measure-only, priority 1 of 4 under tsk-a5pxwgkgr73e (budget nte-qswgka9xkdf9, rerun nte-6t6wyf3dna2d). Goal: name what fills the ~840 ms between the load event (~700 ms) and the last request on a cold board (1546 ms) and card panel (1534 ms). Both miss ~1 s by ~540 ms. Measure: (a) the cold request timeline per call: the …/tasks column pages, avatars, /bootstrap. (b) The server split of those calls from the hub log maity_hub.timing for the run window (db_ms against total_ms). (c) The warm 550–557 kB by response. (d) A render trace of the board in the browser. Maps to: context/performance.md items 14 (render cost) and 13 (response size), and 12 (indexes) if the log puts the time 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 1 of 4 under tsk-a5pxwgkgr73e (budget nte-qswgka9xkdf9, rerun nte-6t6wyf3dna2d).

    Goal: name what fills the ~840 ms between the load event (~700 ms) and the last request on a cold board (1546 ms) and card panel (1534 ms). Both miss ~1 s by ~540 ms.

    Measure:

    • the cold request timeline per call: the …/tasks column pages, avatars, /bootstrap
    • the server split of those calls from the hub log maity_hub.timing for the run window (db_ms against total_ms)
    • the warm 550–557 kB, broken down by response
    • a render trace of the board in the browser

    Maps to: context/performance.md items 14 (render cost) and 13 (response size), and 12 (indexes) if the log puts the time 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:33 UTC

    Measured 2026-11-20 11:31–11:35Z from oliver-pc01-l (the same host as nte-6t6wyf3dna2d), hub 0.1.0a10 (fccd88f), test account balu, read-only. Runs: perf/pageload.py --runs 3 --pages board,card (board cold 663 / last request 1586 ms, card cold 710 / 1595 ms, so this matches the rerun). Plus a new perf/trace.py (one traced cold load each, Chrome devtools timeline), and the hub's maity_hub.timing lines for the window.

    Short answer: the ~840 ms after the load event is a serial chain of 4 API waves with gaps, and the browser's main thread is idle until ~1.25 s. "Last request" also undercounts: style recalculation then holds the main thread until ~1.9 s (board) / ~2.1 s (card).

    (a) Cold timeline, board (traced load; card is the same plus /notes and /history in wave 3):

    | ms after navigation | what |
    |---|---|
    | 0–648 | HTML + 113 assets (~1 MB); main thread ≤ 21 ms busy per 100 ms |
    | 648–800 | wave 1: /bootstrap (87 kB), alone; it starts only at the load event |
    | 800–951 | 151 ms gap: no request in flight and the main thread idle (8 ms busy), so it is waiting on something, not computing (a timer, or the excluded long poll …/events?wait) |
    | 951–1109 | wave 2: the 6 column fetches in parallel; the open column (185 kB) is the longest at 158 ms |
    | 1112–1207 | wave 3: the open column's page 2 (cursor, 59 kB), started only after page 1 |
    | 1207–1254 | 47 ms of script |
    | 1254–1340 | wave 4: status=all&order=updated… (44 kB) + /auth/sessions?ended=true (17 kB) + /auth/second-factor |
    | 1340–1425 | 85 ms of script |
    | 1425–1486 | wave 5: 3 avatars (s=32) — the "last request" |
    | 1256–1876 | main thread 100 % busy: 4 long tasks of 87–223 ms, mostly style recalculation (115–134 ms each over 11.5k–15.8k elements) plus layout 34–66 ms |

    Card: same shape, the long tasks run to 2094 ms (6 of them; 3 × ~140 ms style over ~16.2k elements).

  3. Mr. Robot · Nov 20, 2026, 11:33 UTC

    (2/2) for tsk-jaw0g9fe3trz, continued from the previous note.

    (b) Server split (hub log, all pods, 11:31:34–11:32:08Z; the window includes other members' traffic, so these are per route, not per click):

    | route | n | SQL statements (med) | db_ms med | total_ms med | total p90 |
    |---|---|---|---|---|---|
    | /bootstrap | 17 | 73 | 148 | 138 | 150 |
    | …/tasks | 112 | 18 | 39 | 69 | 122 |
    | …/members | 8 | 35 | 71 | 103 | 112 |
    | …/tasks/{id}/notes | 11 | 9 | 21 | 38 | 144 |
    | /avatars/{id} | 18 | 10 | 18 | 33 | 35 |
    | /auth/sessions | 15 | 9 | 15 | 28 | 34 |

    So /bootstrap is ~140 ms of server time, nearly all database (73 statements); the browser sees ~152–158 ms. The open column is ~120 ms server (p90) + transfer of 185 kB. In the hub's split, db_ms ≈ total_ms for bootstrap: the time is in the database, statement count rather than one slow query (item 12 only if a single statement dominates; the log has no per-statement split).

    (c) Warm 541–557 kB by response (warm assets come from the browser cache; the bytes are the API JSON): open column 185 kB + page 2 59 kB = 245 kB (45 %), /bootstrap 87 kB, done 62 kB, status=all 44 kB, blocked,review 29 kB, cancelled 28 kB, /auth/sessions?ended=true 17 kB, in_progress 15 kB, proposed 15 kB, avatars ~5 kB.

    (d) Render trace: see the last row of (a). Style recalculation over ~16k elements, repeated 3–4 times as the waves land, is the largest single cost after the network chain. It is invisible to "last request", which ends at ~1.5 s.

    Where the time goes, for the budget (board, ~1.0 s target): load event 648 → +152 bootstrap → +151 idle gap → +158 columns → +98 open page 2 → +47 script → +86 wave 4 → +85 script → +61 avatars, then ~450 ms of style/layout. Candidates by size: render cost (item 14: ~450–600 ms, style over 16k elements); the serial chain (bootstrap only after the load event, the 151 ms idle gap, the open column's second page after the first, avatars only after wave 4); response size (item 13: the open column at 245 kB). Not measured here: which code path schedules the 151 ms gap.

    Tools and data: perf/trace.py (new, maity-ops), runs in perf/results/2026-11-20-fccd88f-boardcard.jsonl; traces kept on the PC (~/ops-workspace/tmp/trace-{board,card}.json).

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

    Correction to nte-j8xbreph52zd: the '151 ms gap with no request in flight' after /bootstrap is not idle. It is /me/notifications?limit=0 (800–947 ms in the trace), which pageload.py's long-poll filter hid. Hub median ~102 ms, 27 SQL. Details on tsk-nwq3azjf63db. The filter now counts head reads (maity-ops, pageload.py).