0
0
Fork 0

Fix performance on instances list in admin UI (#15282)

- Reduce duplicate queries
- Remove n+1 queries
- Add accounts count to detailed view
- Add separate action log entry for updating existing domain blocks
This commit is contained in:
Eugen Rochko 2020-12-14 09:06:34 +01:00 committed by GitHub
parent a3b5675aa8
commit 216b85b053
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 331 additions and 171 deletions

View file

@ -29,7 +29,7 @@ class InstancePresenter
end
def domain_count
Rails.cache.fetch('distinct_domain_count') { Account.distinct.count(:domain) }
Rails.cache.fetch('distinct_domain_count') { Instance.count }
end
def sample_accounts