mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-04 11:17:51 +00:00
`jsonschema.validate` checks the schema against the metaschema on every call. For power levels that cost more than validating the event: about 9 ms per `/createRoom`. Check the power levels and mentions schemas once at import and validate with bound validator instances, reporting the same best-match error. `create_event` also ran `validate_new` a second time on the event that `create_new_client_event` had just validated. Drop the repeat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PVLsNh6akt4ifEizY4D1ta