Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

DM creation is slow #13963

Closed
H-Shay opened this issue Sep 29, 2022 · 2 comments
Closed

DM creation is slow #13963

H-Shay opened this issue Sep 29, 2022 · 2 comments
Assignees
Labels
A-DMs Issues around DM rooms O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. Z-Epic

Comments

@H-Shay
Copy link
Contributor

H-Shay commented Sep 29, 2022

DM creation in Synapse is know to be slow, taking up to approximately 1-3s in some traces. Ideally this should not take more than 300ms, although it is unclear if it is possible to get there. There has been some work done on this issue, namely #13800.

Known next steps:
Investigate whether the membership event in the initial create room events can be added to the batch for bulk persisting:
#13959
Batch up storing state groups for initial room creation events:
#13961
Investigate which other events can be batched for bulk persisting and do so:
#13962

It is unclear if taking these steps will totally resolve the issue. If they do not, it might be necessary to add more logging to determine more precisely where the time is going (especially with regard to database calls), or look at trying to speed up event persistence in general.

@H-Shay H-Shay added S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience labels Sep 29, 2022
@H-Shay H-Shay self-assigned this Sep 29, 2022
@kittykat kittykat added the A-DMs Issues around DM rooms label Sep 30, 2022
@DMRobertson
Copy link
Contributor

(Would it be helpful to have a milestone for the faster DMs/faster room creation work?)

@erikjohnston
Copy link
Member

Once #13961 (PR #14918) has landed this should hopefully be good enough. We'll likely still continue the work fixing up the module API to support batching (which blocks #13959), but that is more being as a tidy up task.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-DMs Issues around DM rooms O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. Z-Epic
Projects
None yet
Development

No branches or pull requests

4 participants