-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
groups APIs are incredibly slow to query #2966
Comments
@ara4n , I'd like to work on this issue to familiarize myself with the synapse codebase, hope that's okay? |
Is this still an issue? I just tried to repro the command and it took roughly 2 seconds: time curl 'https://matrix.org/_matrix/client/r0/groups/%2Blinear-supporters%3Amatrix.org/users?' -H 'Authorization: Bearer <SECRET>' -H 'Origin: https://riot.im' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en,en-US;q=0.9,fr;q=0.8' -H 'User-Ag
ent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36' -H 'Accept: */*' -H 'Referer: https://riot.im/develop/' -H 'Connection: keep-alive' --compressed
...
2.38 real
0.02 user
0.00 sys |
if you get lucky it takes about 2s; if you don't (e.g. if your riot is doing a lot of simultaneous groups requests around the same time, or if the server is a bit slow) it can be as much as 17s. as per the original bug. I don't think anything has been significantly improved on it, and there's a misdesign in the implementation on synapse (e.g. lack of caching). However, there is a chance this is going to be changed in the relatively near future by significantly improving the groups API. If anyone wants to dig into the synapse code and profile it, though, it'd still be appreciated. |
Communities/groups are being removed, see #11584. |
17 seconds just to get the list of users in +linear-supporters:matrix.org?!
The text was updated successfully, but these errors were encountered: