synapse/tests
Erik Johnston 5408101d21
Speed up pruning of ratelimiter (#19129)
I noticed this in some profiling. Basically, we prune the ratelimiters
by copying and iterating over every entry every 60 seconds. Instead,
let's use a wheel timer to track when we should potentially prune a
given key, and then we a) check fewer keys, and b) can run more
frequently. Hopefully this should mean we don't have a large pause
everytime we prune a ratelimiter with lots of keys.

Also fixes a bug where we didn't prune entries that were added via
`record_action` and never subsequently updated. This affected the media
and joins-per-room ratelimiter.
2025-11-04 12:44:57 +00:00
..
api Speed up pruning of ratelimiter (#19129) 2025-11-04 12:44:57 +00:00
app Fix lost logcontext on HomeServer.shutdown() (#19108) 2025-11-03 14:07:10 -06:00
appservice Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
config Pydantic v2 (#19071) 2025-10-31 09:22:22 +00:00
crypto Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
events Fix "There is no current event loop in thread" error in tests (#19134) 2025-11-04 12:32:49 +00:00
federation Speed up pruning of ratelimiter (#19129) 2025-11-04 12:44:57 +00:00
handlers Speed up pruning of ratelimiter (#19129) 2025-11-04 12:44:57 +00:00
http Move reading of multipart response into try body (#19062) 2025-10-30 15:22:52 +00:00
logging Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
media Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
metrics Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
module_api Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
push Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
replication Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
rest Pydantic v2 (#19071) 2025-10-31 09:22:22 +00:00
scripts Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
server_notices Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
state Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
storage Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
synapse_rust
test_utils Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
types
util Update check_dependencies to support markers (#19110) 2025-10-30 21:33:29 +00:00
__init__.py
server.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_distributor.py
test_event_auth.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_mau.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_phone_home.py
test_rust.py
test_server.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_state.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_terms_auth.py
test_types.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_visibility.py
unittest.py Fix lost logcontext when using timeout_deferred(...) (#19090) 2025-10-30 11:49:15 -05:00
utils.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00