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

Add table for ignored users to make calculating push rules faster for large rooms. #9022

@erikjohnston

Description

@erikjohnston

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)

Metadata

Metadata

Assignees

Labels

A-PerformancePerformance, both client-facing and admin-facing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions