Channel list: slow at login, and redrawn in full for every post read #238
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#238
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 performance review (#230, D-058).
The left column (
app/src/main_view/conf_nav.rs) has two resources,overviewandmine, that cost more than they need to.At login:
mineasks the server for the name of every membership, one at a time (conf_namein a loop). With 400 memberships at 30 ms that is 12 s before the list is complete. Batch it (small parallel chunks, asBATCHelsewhere), and draw names as they come.overviewcounts the unread posts of each conference one at a time, by paging the whole unread range withlocal-to-globalin batches ofMAP_BATCH = 100. A conference with 5 000 unread takes 50 sequential calls before its count shows.highest-local-noand the read ranges we already have. Refine it in the background.After login: both resources read
tick()andchanges().tickgoes up for every post read (also by scrolling, #180).changesgoes up for every login and logout on the server.Measure with #225: time from login until the channel list is complete, for a person with ~300 memberships (add one to the seed), and redraws of the left column per post read.
Merged in #262; main run #439 green. Verified: devserver tests, full e2e on three profiles (332 passed), and
tools/perf.sh: with 300 channels plus Stort möte and the mailbox (30 ms each way), all 301 channels listed after 6.7 s instead of 42.4 s, login calls 1 656 → 972. The list is still rebuilt after each batch of marks, with no calls now; the rows themselves are cheap.