mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 12:52:24 +03:00
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:
parent
8f944f6434
commit
f4e77453cb
5 changed files with 43 additions and 23 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue