diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-03-06 01:50:35 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-03-06 01:50:35 +0100 |
commit | d6cb4bbe99f16b40c5962130d19ca3336124af1b (patch) | |
tree | 7ec9acad81639a4dce8832fa45aed81b4e43b6e7 /app | |
parent | 03a857f59a773483924a942ac3bda1b290f82a2e (diff) |
Performance improvement for profiles
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/api/v1/accounts_controller.rb | 1 | ||||
-rw-r--r-- | app/models/media_attachment.rb | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb index c666651b4..9c84e0a1b 100644 --- a/app/controllers/api/v1/accounts_controller.rb +++ b/app/controllers/api/v1/accounts_controller.rb @@ -53,6 +53,7 @@ class Api::V1::AccountsController < ApiController set_maps(@statuses) set_counters_maps(@statuses) + set_account_counters_maps(@statuses.flat_map { |s| [s.account, s.reblog? ? s.reblog.account : nil] }.compact.uniq) next_path = statuses_api_v1_account_url(max_id: @statuses.last.id) unless @statuses.empty? prev_path = statuses_api_v1_account_url(since_id: @statuses.first.id) unless @statuses.empty? diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index 1090f1b39..818190214 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -67,7 +67,8 @@ class MediaAttachment < ApplicationRecord 'vf' => 'scale=\'trunc(iw/2)*2:trunc(ih/2)*2\'', 'vsync' => 'cfr', 'b:v' => '1300K', - 'crf' => 4, + 'maxrate' => '500K', + 'crf' => 6, }, }, }, |