Fix performance of responding to user key requests over federation (#10221)

We were repeatedly looking up a config option in a loop (using the
unclassed config style), which is expensive enough that it can cause
large CPU usage.
This commit is contained in:
Erik Johnston 2021-06-21 14:38:59 +01:00 committed by GitHub
parent 182147195b
commit a5cd05beee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View file

@ -11,6 +11,7 @@ from synapse.config import (
database,
emailconfig,
experimental,
federation,
groups,
jwt,
key,
@ -87,6 +88,7 @@ class RootConfig:
tracer: tracer.TracerConfig
redis: redis.RedisConfig
modules: modules.ModulesConfig
federation: federation.FederationConfig
config_classes: List = ...
def __init__(self) -> None: ...