Skip to content

Conversation

olivia-fl
Copy link
Contributor

On my machine, this reduces idle CPU usage from 150% to ~0.5%.

@olivia-fl
Copy link
Contributor Author

Fixes: #111

This implementation results in very high CPU usage with large rooms,
where we are iterating over all members every few seconds. Most members
do not have a read receipt attached to any loaded events, and most read
receipts that are attached to a loaded event do not change frequently.
This re-enables handling for read receipt changes that occur after iamb
is launched, but does not show any read receipts that were last updated
in a previous run and persisted to the db.
This re-enables read receipts that were persisted to the db on a
previous run of 'iamb'.
This is the last bit of functionality from the previous read receipt
implementation. It's still a polling loop, but does _significantly_ less
work.
@ulyssa ulyssa changed the title More effecient read receipt implementation Reduce CPU usage by instead fetching read receipts after related sync events Oct 16, 2023
@ulyssa ulyssa enabled auto-merge (squash) October 16, 2023 00:32
@ulyssa ulyssa added the perf label Oct 16, 2023
@ulyssa ulyssa merged commit b2b47ed into ulyssa:main Oct 16, 2023
@ulyssa
Copy link
Owner

ulyssa commented Oct 16, 2023

Thank you for digging into this, @Benjamin-L !

@ulyssa ulyssa added this to the v0.0.9 milestone Feb 29, 2024
@ulyssa ulyssa mentioned this pull request Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants