buffer: Change the deferred user loading logic.

Now that we get partial sync responses the difference between added
users and total room users won't ever be a large number. Just deffer
user adding based on the number of already added users.
This commit is contained in:
Damir Jelić 2018-10-12 14:05:32 +02:00
parent a8b62577d7
commit 4ebcfe59a2

View file

@ -877,7 +877,7 @@ class RoomBuffer(object):
# the strings that are compared at every itteration.
# Because the search time get's increasingly longer we're
# going to add nicks later in a timer hook.
if ((len(self.room.users) - len(self.displayed_nicks)) > 500
if (len(self.displayed_nicks) > 100
and is_state):
self.unhandled_users.append(event.state_key)
else: