Speed up state res v2 across large state differences. (#7725)

code_spécifique_watcha
Erik Johnston 4 years ago committed by GitHub
parent 1b1489ff18
commit 91e886d615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      changelog.d/7725.misc
  2. 3
      synapse/state/v2.py

@ -0,0 +1 @@
Speed up state res v2 across large state differences.

@ -133,8 +133,9 @@ def resolve_events_with_store(
# OK, so we've now resolved the power events. Now sort the remaining
# events using the mainline of the resolved power level.
set_power_events = set(sorted_power_events)
leftover_events = [
ev_id for ev_id in full_conflicted_set if ev_id not in sorted_power_events
ev_id for ev_id in full_conflicted_set if ev_id not in set_power_events
]
logger.debug("sorting %d remaining events", len(leftover_events))

Loading…
Cancel
Save