Measure first: a big meeting, a perf spec and a desktop memory run #252

Merged
littlefox merged 2 commits from issue-225-measure into main 2026-10-21 23:40:03 +00:00
Owner

Closes #225

Measuring for 0.6 (D-057), not part of the normal e2e run:

  • tools/perf.sh LABEL: the perf seed (NEOKOM_SEED_PERF=1) on a lyskomd kept in memory (LYSKOM_TMPFS=1; lyskomd fsyncs each new text), 30 ms each way between relay and server (forward.py --delay), then e2e/perf/perf.spec.ts in Chromium. Numbers in e2e/perf-results/LABEL.json; tools/perf-table.py A B compares.
  • tools/desktop-perf.sh LABEL: the release desktop app under Xvfb, RSS of the app and its WebKit processes over 300 posts, idle CPU.
  • The app exposes window.__neokomMemory (wasm memory) and window.__neokomCalls() (calls sent by the session).

Baseline (web, desktop Chromium, main at 2026-10-21):

baseline
login: logged in (ms) 823
login: all 301 channels listed (ms) 41983
login: server calls 1657
read 100 one-offs: step p50 (ms) 229
read 100 one-offs: step p95 (ms) 300
read 100 one-offs: server calls 459
read 300 in a chain: step p50 (ms) 116
read 300 in a chain: step p95 (ms) 125
read 300 in a chain: slowest step (ms) 12457
read 300 in a chain: server calls 3448
read 300 in a chain: style recalcs 2304
read 300 in a chain: long tasks 0
read 300 in a chain: long-task ms 0
read 300 in a chain: JS heap / wasm MB / DOM nodes at 50…300 3.3/6.1/6334 → 3.3/7.4/6575 → 3.3/7.4/6575 → 3.4/7.4/8656 → 3.4/7.4/8656 → 3.3/7.4/6577
scroll the thread: frame p95 (ms) 17
scroll the thread: worst frame (ms) 17
scroll the thread: frames over 50 ms 0
scroll the thread: long tasks 0
idle 20 s: main-thread busy (s) 0.03
idle 20 s: server calls 0
idle 20 s: layouts 1
channel, 25× Visa äldre: posts on the page 520
channel, 25× Visa äldre: DOM nodes 14569
channel, 25× Visa äldre: JS heap (MB) 3.6
channel, 25× Visa äldre: wasm memory (MB) 89.3
channel, 25× Visa äldre: server calls 564
inbox, 2 500 letters: open (ms) 2469
inbox, 2 500 letters: server calls 209
search: hits shown (ms) 23
search: long-task ms 0
at the end: JS heap (MB) 3.8
at the end: wasm memory (MB) 89.3
at the end: DOM nodes 17143
at the end: server calls in all 6472

Desktop baseline: RSS 391 MB at start (WebKitGTK, software rendering), 401 MB after login, 406 MB after 300 posts (flat); 0.04 s CPU in 20 s idle.

Found while building this, and filed: #250 (Inkorg/Alla kanaler/Nytt inlägg covered by a channel's posts or a profile), #251 (reading a thread walks it all from the root: 12.5 s steps), #249 (two flaky specs), and a correction on #237 (the inbox reads only the newest 200 texts: 2.5 s, 213 calls).

Verified: lint four ways (incl. kom-seed); the perf spec passes end to end; normal e2e changes are opt-in (latency, PERF_SPEC/PERF_LABEL), so CI's run covers the rest.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8

Closes #225 Measuring for 0.6 (D-057), not part of the normal e2e run: - `tools/perf.sh LABEL`: the perf seed (`NEOKOM_SEED_PERF=1`) on a lyskomd kept in memory (`LYSKOM_TMPFS=1`; lyskomd fsyncs each new text), 30 ms each way between relay and server (`forward.py --delay`), then `e2e/perf/perf.spec.ts` in Chromium. Numbers in `e2e/perf-results/LABEL.json`; `tools/perf-table.py A B` compares. - `tools/desktop-perf.sh LABEL`: the release desktop app under Xvfb, RSS of the app and its WebKit processes over 300 posts, idle CPU. - The app exposes `window.__neokomMemory` (wasm memory) and `window.__neokomCalls()` (calls sent by the session). Baseline (web, desktop Chromium, main at 2026-10-21): | | baseline | |---|---| | login: logged in (ms) | 823 | | login: all 301 channels listed (ms) | 41983 | | login: server calls | 1657 | | read 100 one-offs: step p50 (ms) | 229 | | read 100 one-offs: step p95 (ms) | 300 | | read 100 one-offs: server calls | 459 | | read 300 in a chain: step p50 (ms) | 116 | | read 300 in a chain: step p95 (ms) | 125 | | read 300 in a chain: slowest step (ms) | 12457 | | read 300 in a chain: server calls | 3448 | | read 300 in a chain: style recalcs | 2304 | | read 300 in a chain: long tasks | 0 | | read 300 in a chain: long-task ms | 0 | | read 300 in a chain: JS heap / wasm MB / DOM nodes at 50…300 | 3.3/6.1/6334 → 3.3/7.4/6575 → 3.3/7.4/6575 → 3.4/7.4/8656 → 3.4/7.4/8656 → 3.3/7.4/6577 | | scroll the thread: frame p95 (ms) | 17 | | scroll the thread: worst frame (ms) | 17 | | scroll the thread: frames over 50 ms | 0 | | scroll the thread: long tasks | 0 | | idle 20 s: main-thread busy (s) | 0.03 | | idle 20 s: server calls | 0 | | idle 20 s: layouts | 1 | | channel, 25× Visa äldre: posts on the page | 520 | | channel, 25× Visa äldre: DOM nodes | 14569 | | channel, 25× Visa äldre: JS heap (MB) | 3.6 | | channel, 25× Visa äldre: wasm memory (MB) | 89.3 | | channel, 25× Visa äldre: server calls | 564 | | inbox, 2 500 letters: open (ms) | 2469 | | inbox, 2 500 letters: server calls | 209 | | search: hits shown (ms) | 23 | | search: long-task ms | 0 | | at the end: JS heap (MB) | 3.8 | | at the end: wasm memory (MB) | 89.3 | | at the end: DOM nodes | 17143 | | at the end: server calls in all | 6472 | Desktop baseline: RSS 391 MB at start (WebKitGTK, software rendering), 401 MB after login, 406 MB after 300 posts (flat); 0.04 s CPU in 20 s idle. Found while building this, and filed: #250 (Inkorg/Alla kanaler/Nytt inlägg covered by a channel's posts or a profile), #251 (reading a thread walks it all from the root: 12.5 s steps), #249 (two flaky specs), and a correction on #237 (the inbox reads only the newest 200 texts: 2.5 s, 213 calls). Verified: lint four ways (incl. kom-seed); the perf spec passes end to end; normal e2e changes are opt-in (latency, PERF_SPEC/PERF_LABEL), so CI's run covers the rest. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Measure first: a big meeting, a perf spec and a desktop memory run
Some checks failed
ci / e2e (push) Has started running
packaging / fedora (pull_request) Has started running
ci / check (push) Successful in 10m3s
packaging / arch (pull_request) Successful in 14m58s
ci / desktop (push) Successful in 19m39s
packaging / nix (pull_request) Successful in 22m28s
packaging / debian (pull_request) Successful in 26m4s
packaging / release (pull_request) Has been cancelled
c5abe1fe63
0.6 is about performance (D-057), and every fix should come with a
before/after number. tools/perf.sh seeds a big meeting (NEOKOM_SEED_PERF:
~2 800 texts, a 1 500-long chain, 300 more channels, 2 500 letters) on a
lyskomd kept in memory, puts 30 ms each way between relay and server,
and runs e2e/perf/perf.spec.ts in Chromium: memory (JS heap and the
app's wasm), DOM nodes, main-thread time, long tasks, frames while
scrolling, step times and server calls. tools/desktop-perf.sh measures
the desktop app's RSS and idle CPU. tools/perf-table.py compares runs.

The app exposes its wasm memory and the session's call count to the page
for this; Chromium shows no WebSocket frames sent from wasm.

Refs #225

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Perf: a scenario for reading cards by scrolling past them
All checks were successful
ci / check (push) Successful in 11m50s
packaging / arch (pull_request) Successful in 16m51s
ci / desktop (push) Successful in 20m13s
packaging / debian (pull_request) Successful in 25m40s
ci / e2e (push) Successful in 34m34s
packaging / fedora (pull_request) Successful in 39m40s
packaging / nix (pull_request) Successful in 39m13s
packaging / release (pull_request) Has been skipped
91bc19544c
Reading with space marks few cards by being seen, the case #228 is
about. This scrolls slowly through a post's 120 unread replies.

Refs #225

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-22 14:11:05 +00:00
Sign in to join this conversation.
No description provided.