CI: speed and memory budgets from the perf run (#287) #303

Merged
littlefox merged 12 commits from issue-287-perf-budgets into main 2026-10-23 17:10:24 +00:00
Owner

Closes #287

CI fails when the gains of 0.6 slip back:

  • tools/perf-budget.py RESULTS.json [BUDGET.json] checks a perf run against e2e/perf/budget.json ("scenario.metric": {max, why}); over a budget, a failed scenario or a missing metric fails. Its tests (tools/test_perf_budget.py: passes within, fails over/failed/missing, the budget file parses) run in the check job.
  • Budgets from main today (tools/perf.sh main-07): channels listed at login, calls at login, chain p95/slowest step and calls, one-offs p95, frames over 50 ms reading by scrolling and scrolling a thread, idle calls, calls paging back a channel, the giant thread (#285), wasm memory, DOM nodes and all calls at the end. Counts ~20 % headroom; times ~2.5x until CI's own numbers are in.
  • .forgejo/workflows/perf.yml: nightly, by hand, and on pull requests labelled perf (this one is). tools/perf.sh runs the check locally too.

The time budgets will likely be tightened once a few CI runs show the shared runners' numbers.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8

Closes #287 CI fails when the gains of 0.6 slip back: - `tools/perf-budget.py RESULTS.json [BUDGET.json]` checks a perf run against `e2e/perf/budget.json` (`"scenario.metric": {max, why}`); over a budget, a failed scenario or a missing metric fails. Its tests (`tools/test_perf_budget.py`: passes within, fails over/failed/missing, the budget file parses) run in the `check` job. - Budgets from main today (`tools/perf.sh main-07`): channels listed at login, calls at login, chain p95/slowest step and calls, one-offs p95, frames over 50 ms reading by scrolling and scrolling a thread, idle calls, calls paging back a channel, the giant thread (#285), wasm memory, DOM nodes and all calls at the end. Counts ~20 % headroom; times ~2.5x until CI's own numbers are in. - `.forgejo/workflows/perf.yml`: nightly, by hand, and on pull requests labelled `perf` (this one is). `tools/perf.sh` runs the check locally too. The time budgets will likely be tightened once a few CI runs show the shared runners' numbers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
CI: speed and memory budgets from the perf run (#287)
Some checks failed
ci / e2e (push) Has started running
ci / check (push) Successful in 10m12s
perf / perf (pull_request) Failing after 11m39s
ci / desktop (push) Successful in 16m35s
5fb513b157
0.7 rewrites the channel and thread views; CI should notice when what
0.6 gained slips back. tools/perf-budget.py checks a perf run against
e2e/perf/budget.json (server calls, DOM nodes, wasm memory, slow frames,
step times; main's numbers with headroom). The perf run is too slow for
every push, so a perf workflow runs it nightly, by hand, and on pull
requests labelled perf. The check's tests run in the check job.

Refs #287

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Perf budgets: times from CI's first run
Some checks failed
ci / e2e (push) Has started running
ci / desktop (push) Has started running
ci / check (push) Successful in 7m39s
perf / perf (pull_request) Failing after 11m52s
a0cdaebd3c
The first perf run on CI (#499) was within every budget but the calls
while idle: a slower runner still finishes loads during those 20 s (4
calls, not 1). Times are now about 1.3x CI's, not 2.5x the dev
machine's. The results upload as logs-perf, which tools/forge.py logs
fetches.

Refs #287

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Perf: the end snapshot before the giant thread step
Some checks failed
ci / e2e (push) Has started running
perf / perf (pull_request) Has started running
ci / check (push) Has been cancelled
ci / desktop (push) Has been cancelled
9e73f22573
The end numbers (DOM nodes, memory, calls) came right after opening the
giant thread as a chat, so they counted that chat, as far as it had
loaded: 11 000 nodes in one CI run, 16 800 in the next. Taken before it,
they stay comparable with 0.6's runs.

Refs #287

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Merge main into issue-287-perf-budgets
Some checks failed
ci / e2e (push) Has started running
ci / check (push) Successful in 9m39s
perf / perf (pull_request) Failing after 12m28s
ci / desktop (push) Successful in 16m53s
a98051d9bf
Perf: close the search before the end snapshot
Some checks failed
ci / e2e (push) Has started running
perf / perf (pull_request) Failing after 10m58s
ci / check (push) Successful in 11m48s
ci / desktop (push) Has been cancelled
fccee8b68c
The end's DOM nodes counted the search hits left open, and how many
there are depends on what the search index happened to gather during
the run: 11 000, 16 800 and 15 100 nodes in three CI runs of the same
code. Closed again, end measures the app itself.

Refs #287

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Perf budgets: room for how CI's login time varies
Some checks failed
ci / check (push) Successful in 9m50s
perf / perf (pull_request) Successful in 12m27s
ci / desktop (push) Failing after 18m22s
ci / e2e (push) Successful in 35m56s
ec40967a66
Four CI runs of the same code listed all channels at login in 8.9 to
13.9 s, as busy as the shared runner was; the DOM at the end was 11 000
to 13 200 nodes. The budgets now allow that, still far below what a
real regression (a list that stops windowing) would show.

Refs #287

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Merge main into issue-287-perf-budgets
Some checks failed
ci / check (push) Successful in 11m48s
perf / perf (pull_request) Failing after 13m38s
ci / desktop (push) Successful in 19m4s
ci / e2e (push) Successful in 38m34s
e2870ba61a
Merge main into issue-287-perf-budgets; chain budgets after #305
Some checks failed
ci / check (push) Successful in 10m49s
perf / perf (pull_request) Successful in 13m8s
ci / desktop (push) Successful in 17m19s
ci / e2e (push) Failing after 40m3s
ccdb2316a2
#305 fetches the next 200 texts of a thread walk at once: fewer calls a
step afterwards, but one burst near step 180, so 300 steps of the long
chain take 1092 calls here instead of 925. The slowest step stays 139 ms
here; on CI one run (#536) had a 434 ms step with the p95 at 207, so the
max, a single step, gets more room and the p95 stays the steady guard.

Refs #287

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Merge remote-tracking branch 'origin/main' into issue-287-perf-budgets
Some checks failed
ci / check (push) Successful in 8m48s
perf / perf (pull_request) Failing after 13m1s
ci / desktop (push) Successful in 18m2s
ci / e2e (push) Successful in 39m38s
7ac76bd8bb
# Conflicts:
#	docs/DESIGN.md
Merge main into issue-287-perf-budgets; chain budgets back down
All checks were successful
ci / check (push) Successful in 9m57s
perf / perf (pull_request) Successful in 11m28s
packaging / arch (pull_request) Successful in 12m39s
ci / desktop (push) Successful in 16m38s
packaging / debian (pull_request) Successful in 18m3s
packaging / fedora (pull_request) Successful in 27m44s
ci / e2e (push) Successful in 35m3s
packaging / nix (pull_request) Successful in 20m27s
packaging / release (pull_request) Has been skipped
a951ca96ba
With #311 the walk down no longer fetches 400 texts at once: the long
chain's slowest step and its calls are back near where the budgets were
set, so they get their old room back.

Refs #287

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
littlefox referenced this pull request from a commit 2026-10-24 13:23:56 +00:00
Sign in to join this conversation.
No description provided.