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 Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00
api Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00
app Create a ListenerConfig object (#7681) 2020-06-16 12:44:07 +01:00
appservice Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00
config Support running multiple media repos. (#7706) 2020-06-17 14:13:30 +01:00
crypto Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00
events Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00
federation Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00
groups Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00
handlers Yield during large v2 state res. (#7735) 2020-06-24 18:48:18 +01:00
http Include a user agent in federation requests. (#7677) 2020-06-16 10:43:29 -04:00
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 Wrap register_device coroutine in an ensureDeferred (#7684) 2020-06-16 10:13:59 +01:00
push add a comment 2020-06-18 10:47:06 +01:00
replication Refactor getting replication updates from database. (#7636) 2020-06-16 17:10:28 +01:00
res/templates Implement OpenID Connect-based login (#7256) 2020-05-08 08:30:40 -04:00
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 Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00
spam_checker_api Add type hints to the spam check module (#6915) 2020-02-14 12:49:40 -05:00
state Yield during large v2 state res. (#7735) 2020-06-24 18:48:18 +01:00
static Clean-up the fallback login code. (#7657) 2020-06-10 09:50:39 -04:00
storage Allow local media to be marked as safe from being quarantined. (#7718) 2020-06-22 08:04:14 -04:00
streams Bump version of mypy 2019-12-12 15:21:12 +00:00
util Fix "argument of type 'ObservableDeferred' is not iterable" error (#7708) 2020-06-16 12:01:18 -04:00
__init__.py 1.15.1 2020-06-16 10:28:58 +01:00
event_auth.py Add type hints to event_auth code. (#7505) 2020-05-15 11:19:43 -04:00
notifier.py Fix new flake8 errors (#7489) 2020-05-13 08:24:50 -04:00
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 Run Black. (#5482) 2019-06-20 19:32:02 +10:00
server.py Performance improvements and refactor of Ratelimiter (#7595) 2020-06-05 10:47:20 +01:00
server.pyi Add ability to wait for replication streams (#7542) 2020-05-22 14:21:54 +01:00
types.py Validate the alt_aliases property of canonical alias events (#6971) 2020-03-03 07:12:45 -05:00
visibility.py Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00