-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve responsiveness of spam checking #7
Conversation
Now that we know that the list of URLs will easily fit in memory, we can use a much faster trie-based approach.
…ending messages. This should be much more responsive for users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you run black
, isort
and flake8
over this please? They're the standard linters and will make the module match the Synapse style guide
Otherwise looks good, mostly just tidying things up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good, but let's run make_automaton
in a thread
check_media_file_for_spam
spam checker hook synapse#9311 has landed, we'll be able to use this new API to check files during upload/download rather than in the middle of message sending. This should keep things much more responsive for the critical path.