Channel list at login: counts six at a time, read ranges in one call #262

Merged
littlefox merged 4 commits from issue-238-channel-list into main 2026-10-22 04:34:00 +00:00
Owner

Closes #238

  • get-membership at login brings every membership's read ranges (want-read-ranges), so counting needs no query-read-texts per channel.
  • Counting pages local-to-global 255 texts a call (the protocol's most), not 100.
  • Kom::overview counts six channels at a time, not one after the other.
  • Kom::conf_names: the channel list's names 16 at a time.

Measured with tools/perf.sh (300 channels plus Stort möte and the mailbox, 30 ms each way):

main after
until all 301 channels are listed 42 363 ms 6 682 ms (−84 %)
server calls at login 1 656 972 (−41 %)

Left of #238: the list is still rebuilt after each batch of marks (it costs no calls now; #254 batches the marks). Drawing only changed rows comes with the list work in #236.

Verified: devserver tests (15), full e2e on three profiles 332 passed, lint four ways.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8

Closes #238 - `get-membership` at login brings every membership's read ranges (`want-read-ranges`), so counting needs no `query-read-texts` per channel. - Counting pages `local-to-global` 255 texts a call (the protocol's most), not 100. - `Kom::overview` counts six channels at a time, not one after the other. - `Kom::conf_names`: the channel list's names 16 at a time. Measured with `tools/perf.sh` (300 channels plus Stort möte and the mailbox, 30 ms each way): | | main | after | |---|---|---| | until all 301 channels are listed | 42 363 ms | 6 682 ms (−84 %) | | server calls at login | 1 656 | 972 (−41 %) | Left of #238: the list is still rebuilt after each batch of marks (it costs no calls now; #254 batches the marks). Drawing only changed rows comes with the list work in #236. Verified: devserver tests (15), full e2e on three profiles 332 passed, lint four ways. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
With 300 channels the unread list took 42 s (30 ms each way) and 1 656
calls: each channel's read ranges were queried, then counted 100 texts a
call, one channel after the other, and every name fetched in turn. Now
get-membership brings every read range at login, counting pages 255
texts a call, six channels at once, and names come 16 at a time: 6.7 s
and 972 calls.

Closes #238

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-238-channel-list
Some checks are pending
ci / desktop (push) Successful in 17m20s
ci / check (push) Successful in 9m41s
ci / e2e (push) Has started running
28bd72cc64
Merge remote-tracking branch 'origin/main' into issue-238-channel-list
Some checks failed
ci / check (push) Successful in 10m20s
ci / e2e (push) Failing after 8m40s
ci / desktop (push) Successful in 16m33s
5e3d4672c8
# Conflicts:
#	crates/kom-client/src/kom.rs
Merge remote-tracking branch 'origin/main' into issue-238-channel-list
All checks were successful
ci / check (push) Successful in 10m5s
ci / desktop (push) Successful in 14m47s
ci / e2e (push) Successful in 29m30s
044f481d1c
littlefox referenced this pull request from a commit 2026-10-22 14:11:06 +00:00
Sign in to join this conversation.
No description provided.