mjolnir
mjolnir copied to clipboard
Apply bans before ACLs
In my instance it takes 2x longer to apply ACLs than new bans (16s vs. 8s). However, I very infrequently apply ACLs. The goal of this change is to reduce the time to apply moderation action.
Hey @grahamc , thanks for taking a look at this.
It is interesting that it takes longer to apply server ACL than member bans. From what I can see, the pain points are probably either asking for the m.room.server_acl state event or sending the update afterwards, but it's not certain.
I'm worried that there is a risk by changing the order since larger and more severe raids will take place over federation rather than at the individual member level, and delaying action in that case would seem to have greater consequences than in the current order (ACL before member bans).
What's you opinion about that?
I'm interested to know if anyone else has an opinion about this too?
I don't have strong feelings about this PR. I also haven't had severe raids. It does seem to me that the most user-forward option would be applying whatever the user just did first. ie: not calling a generic "Sync the ban stuff" function, but saying "apply this ban now!" or "apply this ACL now!"
We could actually make both happen concurrently, to some extent, thanks to the magic of async. Wouldn't that be even better?
@Gnuxie What do you think?
Alternatively, we could make this a setting.
I think doing them concurrently (but still room by room) will be a good idea if applied with a suggestion by Travis to apply bans to the most recently active rooms first. If there is an urgent situation, then the most active room is probably going to be the one under attack and will be seen to first, so this works out quite nicely.
Hey @grahamc , what do you think of the changes we made in https://github.com/matrix-org/mjolnir/pull/274 did they help with this and should we close?
Looks great!