oliver-zehentleitner / maity

hub: fewer or batched statements in GET /bootstrap, round-trip bound on prod

Sign in to report

tsk-nndcfpwxbd3p Open

Count each bootstrap part's statements against its single route and remove or batch the repeated ones, the parts' shapes unchanged. Optionally a pool checkout timer in timing.py. No contract change. Evidence and gain in the first note. Done when a rerun by ops on the same host (oliver-pc01-l) shows the gain.

Notes

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

    Fix card 4 of 6 under tsk-a5pxwgkgr73e (proposal seq 175706, item (b), lead's go seq 175707).

    Goal: fewer statements per GET /bootstrap, or the same ones batched. On prod the route is bound by round trips to the managed PostgreSQL, not by a slow plan.

    Scope:

    1. Count each part's statements against its single route.
    2. Remove repeated reads (authentication, membership, the same rows read by several parts), or batch them.
    3. Optional: a pool checkout timer in hub/src/maity_hub/timing.py, so pool waiting is measured rather than inferred.

    The parts' shapes stay as they are.

    Evidence:

    • nte-9m9144akc4zw (a): time linear in the statement count at a flat 1.3–1.9 ms per statement, 73–100 statements on a project view ≈ 130–165 ms, no slow statement, no sign of pool waiting
    • nte-azyzssry9c9b (b)
    • context/performance.md b77c193d (needs-review after this measurement)

    The same pattern, smaller: …/members, 34 statements, db 108 ms, the longest read of settings' last wave.

    Expected gain: about 40–80 ms per project page if a third to a half of the statements go. Less on project-less boots.

    Area: hub.
    Contract: none. No §5.4 change.
    Size: M.

    Done when: a rerun by ops on the same host (oliver-pc01-l) shows the gain.