8000 UI thread performance fixes by bu5hm4nn · Pull Request #4 · bu5hm4nn/gossip · GitHub
[go: up one dir, main page]

Skip to content

UI thread performance fixes - #4

Draft
bu5hm4nn wants to merge 2 commits into
dilger-master-ui-performance-basefrom
ui-thread-performance-fixes
Draft

bu5hm4nn wants to merge 2 commits into
dilger-master-ui-performance-basefrom
ui-thread-performance-fixes

Conversation

@bu5hm4nn
@bu5hm4nn bu5hm4nn commented Nov 27, 2026 •
Copy link
Copy Markdown
Owner

Scrolling the feed could stall while the UI thread waited for LMDB’s writer lock. Hovering an unread note also wrote its viewed state directly from the UI. Both paths worked against Keeping the UI responsive.

Send viewed-state updates through the existing Overlord inbox and batch the writes off-thread. Make Table::read_record open a read-only transaction when the caller doesn’t supply one, so routine lookups don’t acquire the writer lock.

Real LMDB regression tests cover writer contention and lazy table initialization. A live scroll sample went from 716 of 2,772 main-thread samples waiting on the writer lock to none in the follow-up capture. The PR branch passes cargo check; the full test rerun on the new base did not complete within the allotted time.

Avoid waiting for the LMDB writer when reading records without a caller-supplied transaction. Cover writer contention and lazy table initialization with real LMDB tests.
@bu5hm4nn bu5hm4nn self-assigned this Dec 3, 2026
@bu5hm4nn
bu5hm4nn marked this pull request as draft December 3, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0