mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -04:00
Only get cached state from context in persist_event
We don't want to bother pulling out the current state from the DB since until we know we have to. Checking the context for state is just an optimisation.
This commit is contained in:
parent
a646bdc670
commit
50c60e5fad
2 changed files with 16 additions and 1 deletions
|
@ -549,7 +549,9 @@ class EventsStore(EventsWorkerStore):
|
|||
if ctx.state_group in state_groups_map:
|
||||
continue
|
||||
|
||||
state_groups_map[ctx.state_group] = yield ctx.get_current_state_ids(self)
|
||||
current_state_ids = ctx.get_cached_current_state_ids()
|
||||
if current_state_ids is not None:
|
||||
state_groups_map[ctx.state_group] = current_state_ids
|
||||
|
||||
# We need to map the event_ids to their state groups. First, let's
|
||||
# check if the event is one we're persisting, in which case we can
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue