Query rooms with ACLs instead of all rooms (#3338)

This now should actually speed up startup times.
This is because _many_ rooms (like DMs) don't have room ACLs, this means
that we had around 95% pointless DB queries. (as queried on d.m.org)
This commit is contained in:
Till 2024-03-05 20:41:35 +01:00 committed by GitHub
parent 09f15a3d3f
commit 928c8c8c4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 171 additions and 61 deletions

View file

@ -1099,3 +1099,8 @@ func (r *Queryer) QueryUserIDForSender(ctx context.Context, roomID spec.RoomID,
return nil, nil
}
// RoomsWithACLs returns all room IDs for rooms with ACLs
func (r *Queryer) RoomsWithACLs(ctx context.Context) ([]string, error) {
return r.DB.RoomsWithACLs(ctx)
}