Inbox reads the stat of every text in the mailbox, again on every login anywhere #237
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#237
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 while looking into scrolling (#230, D-058).
Kom::conversations(crates/kom-client/src/inbox.rs) maps the whole mailbox withlocal-to-global, then fetches the text stat of every text in it, to group them into chats. For someone who has used LysKOM for years, that is thousands to tens of thousands ofget-text-statcalls the first time the inbox is opened (cached afterwards, without limit, see #236).The resource in
InboxPaneruns again wheneverchangesis bumped, and logins and logouts on the server bump it. So while the inbox is open, every login anywhere maps the mailbox again.A chat then shows only its last
CHAT_TEXTS = 50texts, with no way to see older ones.Directions:
changes(presence), only on mail.Measure with #225: calls and time to open the inbox for a person with ~5 000 texts in the mailbox (add one to the seed).
Correction after measuring (#225): the inbox does not read the whole mailbox.
Kom::conversationstakes the newestLOOK_AT = 200texts, so the first paragraph above is wrong.Measured, Pelle with 2 500 letters, 30 ms each way to the server: the inbox opens in 2.5 s with 213 calls (200 text stats, names, then a preview for each of the 30 newest conversations, one at a time).
What remains of this issue:
changes: every new text anywhere, and today every login and logout (that part goes with #226/#228's presence split).What #237 was about is done: the inbox reads only the newest 200 texts (not the whole mailbox, corrected above), its 30 previews come six at a time (#261: open 2.45 → 1.94 s), and logins and logouts no longer re-run it (#254). Reaching older conversations and older texts in a chat is a feature for later: #265 (1.0).