diff options
author | Erik Johnston <erik@matrix.org> | 2018-10-29 14:01:49 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-10-29 14:01:49 +0000 |
commit | f4f223aa4455bea3aa642c23ae957932b1168ba3 (patch) | |
tree | af4124396b604f05cc549a82c29bc3a5f2ad859e /synapse | |
parent | Make SQL a bit cleaner (diff) | |
download | synapse-f4f223aa4455bea3aa642c23ae957932b1168ba3.tar.xz |
Don't make temporary list
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/storage/state.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py index 45afd42b3f..947d3fc177 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -1266,9 +1266,8 @@ class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore): current_search = next_to_search next_to_search = set() else: - lst = list(next_to_search) - current_search = set(lst[:100]) - next_to_search = set(lst[100:]) + current_search = set(islice(next_to_search, 100)) + next_to_search -= current_search # Check if state groups are referenced sql = """ |