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

This commit is contained in:
Erik Johnston 2020-06-19 13:56:35 +01:00 committed by GitHub
parent 1b1489ff18
commit 91e886d615
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

1
changelog.d/7725.misc Normal file
View file

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

View file

@ -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))