This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Don't pull out the full state of the room when handling new events. #12684
Labels
T-Task
Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Milestone
Currently when we calculate the state group for a new event we always fetch the full state from the DB, even when no state resolution happens. This is then stored in the
EventContext
, which is access viacontext.get_prev_state_ids()
andget_current_state_ids()
.Historically, we needed to store the state in
EventContext
as we may not have persisted it yet. However, nowadays we always store the state group for the new event before we createEventContext
, so we can rely on being able to fetch the state from the DB.I suggest we:
EventContext
and instead fetch state from the DB each time (relying on the caching to minimise performance problems)EventContext
methods to accept aStateFilter
and use those everywhere.The text was updated successfully, but these errors were encountered: