This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Description
For large rooms we spend quite a lot of time figuring out if anyone ignores the user:
|
for uid, rules in rules_by_user.items(): |
|
if event.sender == uid: |
|
continue |
|
|
|
if not event.is_state(): |
|
is_ignored = await self.store.is_ignored_by(event.sender, uid) |
|
if is_ignored: |
|
continue |
which will look up the account data for each uid
user. We can make this way more efficient by having a separate table for ignored users (updated when the account data is updated), which would allow us to do a single query to figure out everyone who ignores event.sender
.
(The table should be quite small since few people are ignored)