Speed up start up time by batch querying ACL events (#3334)

This should significantly speed up start up times on servers with many
rooms.
This commit is contained in:
Till 2024-02-21 14:10:22 +01:00 committed by GitHub
parent 8f944f6434
commit f4e77453cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 43 additions and 23 deletions

View file

@ -235,6 +235,10 @@ func ExtractContentValue(ev *types.HeaderedEvent) string {
key = "topic"
case "m.room.guest_access":
key = "guest_access"
case "m.room.server_acl":
// We need the entire content and not only one key, so we can use it
// on startup to generate the ACLs. This is merely a workaround.
return string(content)
}
result := gjson.GetBytes(content, key)
if !result.Exists() {