When we send an EDU to a large number of hosts (e.g. presence or a receipt in a large room), we instansiate a PerDestinationQueue per host. This has a bunch of overhead, and is pointless for hosts that are marked as "down".
To avoid this, we make sure to only wake up destinations that we will actually try to contact with the new data. This dramatically reduces CPU and memory usages of federation sending in large rooms.
Based on #16221.
When we send an EDU to a large number of hosts (e.g. presence or a receipt in a large room), we instansiate a
PerDestinationQueue
per host. This has a bunch of overhead, and is pointless for hosts that are marked as "down".To avoid this, we make sure to only wake up destinations that we will actually try to contact with the new data. This dramatically reduces CPU and memory usages of federation sending in large rooms.