forked-synapse/synapse
Mathieu Velten cb562d73aa
Improve lock performance when a lot of locks are waiting (#16840)
When a lot of locks are waiting for a single lock, notifying all locks
independently with `call_later` on each release is really costly and
incurs some kind of async contention, where the CPU is spinning a lot
for not much.

The included test is taking around 30s before the change, and 0.5s
after.

It was found following failing tests with
https://github.com/element-hq/synapse/pull/16827.
2024-03-14 13:49:54 +00:00
..
_scripts Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
api Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
app Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
appservice Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
config Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
crypto Only do one concurrent fetch per server in keyring (#16894) 2024-02-09 10:51:11 +00:00
events Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
federation Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
handlers Improve lock performance when a lot of locks are waiting (#16840) 2024-03-14 13:49:54 +00:00
http Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
logging Bump mypy from 1.5.1 to 1.8.0 (#16901) 2024-03-13 17:05:57 +00:00
media Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
metrics Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
module_api Bump mypy from 1.5.1 to 1.8.0 (#16901) 2024-03-13 17:05:57 +00:00
push Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
replication Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
res Use oEmbed for YouTube Shorts (#15025) 2023-05-03 12:54:42 -04:00
rest Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
server_notices Merge remote-tracking branch 'gitlab/clokep/license-license' into new_develop 2023-12-13 15:11:56 +00:00
spam_checker_api Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
state Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
static Update link to the clients webpage, fix #15825 (#15874) 2023-07-06 17:28:09 +02:00
storage Bump mypy from 1.5.1 to 1.8.0 (#16901) 2024-03-13 17:05:57 +00:00
streams Bump mypy from 1.5.1 to 1.8.0 (#16901) 2024-03-13 17:05:57 +00:00
synapse_rust Bump ruff from 0.1.14 to 0.3.2 (#16994) 2024-03-13 17:06:23 +00:00
types Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
util Bump mypy from 1.5.1 to 1.8.0 (#16901) 2024-03-13 17:05:57 +00:00
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
_pydantic_compat.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
event_auth.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
notifier.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
py.typed Mark Module API error imports as re-exported and mark Synapse as containing type annotations (#11054) 2021-10-13 08:42:41 +01:00
server.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
visibility.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00