-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Spaces summary API sometimes has poor performance #10523
Comments
There's been reports of this, but I haven't yet had time to look at why it is slow. I don't plan to look at this until after #10495 since the API is changing anyway. |
Now that #10495 has landed, we can take a look at this. I'll likely only handle this for the new My plan here is two pronged:
|
Another thing to do here, if necessary, might be to store the space relationships in a dedicated table. I'd like to see all of this running for a bit before doing things such as that! |
The last remaining bit of this (for now) is to test that running this on workers is fine (and document that). Once this is in the wild for a bit we might see unexpected performance issues though. |
Most of the changes discussed in here are in Synapse 1.42.0, although 1.43.0 will include some more changes (worker support, properly stripping the As of now, I think I'd like to see if those have good impact on the endpoint before trying to do more optimization. I also might need additional help getting profiles from smaller servers as I think the performance depends quite a bit on what data is being fetched over federation. |
Description
Spaces room list (
_matrix/client/unstable/org.matrix.msc2946/rooms/<room_id>
) takes considerable amount of time to serve (20-60 seconds), which does not seem to be either justified or desirable. (A good example is #osm-space:matrix.org, which contains rooms and spaces as well and takes 20-30 seconds.)First, room list is quite static most of the time, so caching it (and invalidate cache on change) seems to be desirable, especially if the long query time is justified.
However I do not see any real resource usage there (admittedly without analysing the code): both cpu and psql seems not to be busy.
Steps to reproduce
Version information
The text was updated successfully, but these errors were encountered: