summary refs log tree commit diff
path: root/synapse/storage/data_stores
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-05-05 17:07:59 +0100
committerErik Johnston <erik@matrix.org>2020-05-05 17:40:29 +0100
commitf9073893af82eec64b594dbcaef37c407a291c52 (patch)
tree6b57fce16886aef99c6e796900822290866a38df /synapse/storage/data_stores
parentWorkaround for assertion errors from db_query_to_update_function (#7378) (diff)
downloadsynapse-f9073893af82eec64b594dbcaef37c407a291c52.tar.xz
Speed up fetching device lists changes in sync.
Currently we copy `users_who_share_room` needlessly about three times,
which is expensive when the set is large (which it can easily be).
Diffstat (limited to 'synapse/storage/data_stores')
-rw-r--r--synapse/storage/data_stores/main/devices.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/data_stores/main/devices.py b/synapse/storage/data_stores/main/devices.py
index ee3a2ab031..03f5141e6c 100644
--- a/synapse/storage/data_stores/main/devices.py
+++ b/synapse/storage/data_stores/main/devices.py
@@ -541,8 +541,8 @@ class DeviceWorkerStore(SQLBaseStore):
 
         # Get set of users who *may* have changed. Users not in the returned
         # list have definitely not changed.
-        to_check = list(
-            self._device_list_stream_cache.get_entities_changed(user_ids, from_key)
+        to_check = self._device_list_stream_cache.get_entities_changed(
+            user_ids, from_key
         )
 
         if not to_check: