synapse/synapse
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
..
_scripts Merge branch 'release-v1.141' into develop 2025-10-28 12:44:07 +00:00
api Speed up pruning of ratelimiter (#19129) 2025-11-04 12:44:57 +00:00
app Redirect stdout/stderr to logs after initialization (#19131) 2025-11-03 16:16:23 -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 Pydantic v2 (#19071) 2025-10-31 09:22:22 +00:00
federation Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
handlers Merge branch 'release-v1.141' into develop 2025-10-28 12:44:07 +00:00
http Pydantic v2 (#19071) 2025-10-31 09:22:22 +00:00
logging Be mindful of other logging context filters in 3rd-party code (#19068) 2025-10-31 10:12:05 -05:00
media Use Pillow's non-experimental getexif (#19098) 2025-10-28 13:11:45 -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
res Updated providers.json to use X instead of Twitter following rebrand and schema change (#18767) 2025-09-26 11:06:50 +01:00
rest Pydantic v2 (#19071) 2025-10-31 09:22:22 +00:00
server_notices Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
spam_checker_api Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
state Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
static Update link to the clients webpage, fix #15825 (#15874) 2023-07-06 17:28:09 +02:00
storage Pydantic v2 (#19071) 2025-10-31 09:22:22 +00:00
streams Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
synapse_rust Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
types Pydantic v2 (#19071) 2025-10-31 09:22:22 +00:00
util Pydantic v2 (#19071) 2025-10-31 09:22:22 +00:00
__init__.py Drop Python 3.9, bump tests/builds to Python 3.10 (#19099) 2025-10-29 12:15:00 -05:00
event_auth.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
notifier.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
py.typed
server.py Fix lost logcontext on HomeServer.shutdown() (#19108) 2025-11-03 14:07:10 -06:00
visibility.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00