mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-30 00:14:57 +03:00
0e0a2817a2
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.= |
||
---|---|---|
.. | ||
__init__.py | ||
test_v2.py |