-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up loading ACLs on startup #3469
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3469 +/- ##
==========================================
- Coverage 49.42% 49.40% -0.02%
==========================================
Files 524 524
Lines 59674 59737 +63
==========================================
+ Hits 29493 29513 +20
- Misses 26713 26743 +30
- Partials 3468 3481 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
While I only tested this with the initial attempt of just replacing Only logging the duration:
Logging returned events per room:
|
1b98ee5
to
5cd4442
Compare
5cd4442
to
83a2c7d
Compare
Currently d.m.org struggles to start, as it is fetching several thousand ACLs on startup.
The reason is that we're loading the entire room state into memory, only to filter out the majority of it, because we only care about certain types.
This change filters the types (tuples) directly when querying the database, so we don't end up with unneeded state.