Speed up sliding sync by avoiding copies (#17670)

We ended up spending ~10% CPU creating a new dictionary and
`_RoomMembershipForUser`, so let's avoid creating new dicts and copying
by returning `newly_joined`, `newly_left` and `is_dm` as sets directly.

---------

Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
This commit is contained in:
Erik JohnstonandEric Eastwood authored and GitHub committed 2024-09-06 11:12:29 +01:00
1 parent de3363ef58
commit d5accec2e5
5 files changed
+296 -262

No files matched your search

File diff suppressed because it is too large. Load diff