summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-05-04 13:43:19 +0100
committerErik Johnston <erik@matrix.org>2017-05-04 13:43:19 +0100
commit5d8290429ce0ae37a6ef86dd5b96ca82d090ae39 (patch)
tree829a6bc7e273797ff175957af4404eecc3c9a12f /synapse
parentMerge pull request #2147 from matrix-org/dbkr/http_request_propagate_error (diff)
downloadsynapse-5d8290429ce0ae37a6ef86dd5b96ca82d090ae39.tar.xz
Reduce size of get_users_in_room
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/roommember.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py
index 7ad2198d96..f2630787ba 100644
--- a/synapse/storage/roommember.py
+++ b/synapse/storage/roommember.py
@@ -147,7 +147,7 @@ class RoomMemberStore(SQLBaseStore):
         hosts = frozenset(get_domain_from_id(user_id) for user_id in user_ids)
         defer.returnValue(hosts)
 
-    @cached(max_entries=500000, iterable=True)
+    @cached(max_entries=100000, iterable=True)
     def get_users_in_room(self, room_id):
         def f(txn):
             sql = (
@@ -160,7 +160,7 @@ class RoomMemberStore(SQLBaseStore):
             )
 
             txn.execute(sql, (room_id, Membership.JOIN,))
-            return [r[0] for r in txn]
+            return [to_ascii(r[0]) for r in txn]
         return self.runInteraction("get_users_in_room", f)
 
     @cached()