matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.79k stars 2.13k forks source link

`/keys/signatures/upload` is heavy and on the synapse master #6843

Open ara4n opened 4 years ago

ara4n commented 4 years ago

It took ~30s to 'store secrets' on my account, and similarly on Amandine's.

2020-01-24 22:15:56,841 - synapse.access.http.8080 - 233 - INFO - POST-8145074 - 65.127.237.10 - 8080 - Received request: POST /_matrix/client/unstable/keys/signatures/upload
2020-01-24 22:16:22,132 - synapse.handlers.device - 429 - DEBUG - POST-8145074 - Notifying about update '@matthew:matrix.org'/'RQRQBRNDOP', ID: 20726543
2020-01-24 22:16:22,134 - synapse.handlers.device - 438 - INFO - POST-8145074 - Sending device list update notif for '@matthew:matrix.org' to: { <4510 homeservers> }
2020-01-24 22:16:22,600 - synapse.access.http.8080 - 302 - INFO - POST-8145074 - 65.127.237.10 - 8080 - {@matthew:matrix.org} Processed request: 25.756sec/0.003sec (1.734sec, 0.415sec) (3.563sec/11.775sec/2210) 16B 200 "POST /_matrix/client/unstable/keys/signatures/upload HTTP/1.1" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" [0 dbevts]

Surely this shouldn't be on the master. (And should perhaps be an async API if it's going to take so long). See https://github.com/vector-im/riot-web/issues/12223 for the Riot side of this.

uhoreg commented 4 years ago

IIRC, device updates use the same function for notifying, so they probably have the same issue

richvdh commented 4 years ago

@neilisfragile to try to understand what exactly the effect of this is

neilisfragile commented 4 years ago

Not a release blocker, more a nice to have

richvdh commented 4 years ago

we will revisit this once Operation Gemini has progressed somewhat.