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 Johnston
2024-09-06 11:12:29 +01:00
committed by GitHub
co-authored by Eric Eastwood
parent de3363ef58
commit d5accec2e5
5 changed files with 296 additions and 262 deletions
File diff suppressed because it is too large Load Diff