Fewer server round trips when showing posts and threads #234
Labels
No labels
area/ci
area/desktop
area/packaging
area/protocol
area/reading
area/ui
area/web
area/writing
kind/bug
kind/feature
kind/infra
kind/request
needs/user
parked
perf
security
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
littlefox/neokom#234
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found in the codebase review (#230, D-058). Each round trip to lyskomd costs latency, and more over the relay. These are the places that multiply them:
app/src/main_view/mod.rsawaitskom.preview(t)for each card in turn. 100 cards at 30 ms take 3 s before the last one shows.Kom::threadalready does for stats withBATCH. lyskomd penalises floods, so keep the batches small.TextView::buildcallskom.text_statfor each comment-to, footnote-to, commented-in and footnoted-in link. A post with 500 comments costs 500get-text-statcalls to show its card, though the card doesn't show who wrote the replies.preview), or fetch them lazily when the full post is opened.Kom::mark_readsends onemark-as-readper text per conference, while the protocol takes a list. Reading by scrolling (#180, #228) marks many in a row: collect them for a short moment and send one call per conference.session::who_is_onlooks up every session's name withget-uconf-stat, bypassing theuconfscache inKom.kom-clientcopy state:read_setclones the conference'sRangeSeton everyis_unread. Elisp users often have fragmented read ranges.advanceclones the wholeseenset on every batch, andseengrows with every post read in the session.Measure with #225: calls per "Läs nästa" and per thread shown (count frames in a test client), and the time to show the last card.
Merged in #261; main run #437 green (#432 was the npm registry outage, #263). Verified: devserver tests, full e2e on three profiles (332 passed), and
tools/perf.sh: inbox open 2.45 → 1.94 s; reading 120 cards by scrolling: layouts 35 → 18, main-thread 0.37 → 0.27 s. Marks were batched in #254.