MatrixSynapse/synapse
Erik Johnston 0e0a2817a2
Yield during large v2 state res. (#7735)
State res v2 across large data sets can be very CPU intensive, and if
all the relevant events are in the cache the algorithm will run from
start to finish within a single reactor tick. This can result in
blocking the reactor tick for several seconds, which can have major
repercussions on other requests.

To fix this we simply add the occaisonal `sleep(0)` during iterations to
yield execution until the next reactor tick. The aim is to only do this
for large data sets so that we don't impact otherwise quick resolutions.=
2020-06-24 18:48:18 +01:00
..
_scripts
api
app
appservice
config
crypto
events
federation
groups
handlers Yield during large v2 state res. (#7735) 2020-06-24 18:48:18 +01:00
http
logging Add support for using rust-python-jaeger-reporter (#7697) 2020-06-17 14:13:41 +01:00
metrics Set Content-Length for Metrics requests (#7730) 2020-06-23 18:06:01 +01:00
module_api
push add a comment 2020-06-18 10:47:06 +01:00
replication
res/templates
rest add org.matrix.login.jwt so that m.login.jwt can be deprecated (#7675) 2020-06-24 10:23:55 +01:00
server_notices
spam_checker_api
state Yield during large v2 state res. (#7735) 2020-06-24 18:48:18 +01:00
static
storage Allow local media to be marked as safe from being quarantined. (#7718) 2020-06-22 08:04:14 -04:00
streams
util
__init__.py
event_auth.py
notifier.py
python_dependencies.py Require parameterized package version to be at least 0.7.0. (#7680) 2020-06-17 15:31:40 +01:00
secrets.py
server.py
server.pyi
types.py
visibility.py