diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-03-30 15:06:59 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-03-30 15:06:59 +0200 |
commit | de22c202f5e103f433926c763fc3ae179d5976ad (patch) | |
tree | 328a69859cf55572899d673ddc40fa598b23ac46 /app/controllers/api/v1/follow_requests_controller.rb | |
parent | 333e44c3fc687b1f6215db99283536b293cf937f (diff) |
Add counter caches for a large performance increase on API requests
Diffstat (limited to 'app/controllers/api/v1/follow_requests_controller.rb')
-rw-r--r-- | app/controllers/api/v1/follow_requests_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api/v1/follow_requests_controller.rb b/app/controllers/api/v1/follow_requests_controller.rb index 740083735..3b8e8c078 100644 --- a/app/controllers/api/v1/follow_requests_controller.rb +++ b/app/controllers/api/v1/follow_requests_controller.rb @@ -9,7 +9,7 @@ class Api::V1::FollowRequestsController < ApiController accounts = Account.where(id: results.map(&:account_id)).map { |a| [a.id, a] }.to_h @accounts = results.map { |f| accounts[f.account_id] } - set_account_counters_maps(@accounts) + # set_account_counters_maps(@accounts) next_path = api_v1_follow_requests_url(max_id: results.last.id) if results.size == DEFAULT_ACCOUNTS_LIMIT prev_path = api_v1_follow_requests_url(since_id: results.first.id) unless results.empty? |