summary refs log tree commit diff
path: root/LICENSE
diff options
context:
space:
mode:
authorVal Lorentz <progval+git+matrix@progval.net>2023-04-18 15:50:27 +0200
committerGitHub <noreply@github.com>2023-04-18 13:50:27 +0000
commitcb8e274c073d05064987e10713af30508b60ecc7 (patch)
treea82ebc8e25ef37f680e5b8a523beace915526122 /LICENSE
parentMove Spam Checker callbacks to a dedicated file (#15453) (diff)
downloadsynapse-cb8e274c073d05064987e10713af30508b60ecc7.tar.xz
Speedup tests by caching HomeServerConfig instances (#15284)
These two lines:

```
config_obj = HomeServerConfig()
config_obj.parse_config_dict(config, "", "")
```

are called many times with the exact same value for `config`.

As the test suite is CPU-bound and non-negligeably time is spent in
`parse_config_dict`, this saves ~5% on the overall runtime of the Trial
test suite (tested with both `-j2` and `-j12` on a 12t CPU).

This is sadly rather limited, as the cache cannot be shared between
processes (it contains at least jinja2.Template and RLock objects which
aren't pickleable), and Trial tends to run close tests in different
processes.
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions