diff options
author | Erik Johnston <erik@matrix.org> | 2020-06-19 13:56:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-19 13:56:35 +0100 |
commit | 91e886d615dd24ff0258e06470bca0cc8ffe22eb (patch) | |
tree | d5e6b2cf0f803f67ad7813ef5e210667c83fe1db /synapse/state | |
parent | Fixed typo by adding a 'g' to PostgreSQL (#7724) (diff) | |
download | synapse-91e886d615dd24ff0258e06470bca0cc8ffe22eb.tar.xz |
Speed up state res v2 across large state differences. (#7725)
Diffstat (limited to 'synapse/state')
-rw-r--r-- | synapse/state/v2.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/state/v2.py b/synapse/state/v2.py index e25bc5d264..57eadce4e6 100644 --- a/synapse/state/v2.py +++ b/synapse/state/v2.py @@ -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)) |