mirror of
https://github.com/kikobar/mastodon.git
synced 2024-12-25 15:24:14 +00:00
Performance improvement for profiles
This commit is contained in:
parent
03a857f59a
commit
d6cb4bbe99
|
@ -53,6 +53,7 @@ class Api::V1::AccountsController < ApiController
|
||||||
|
|
||||||
set_maps(@statuses)
|
set_maps(@statuses)
|
||||||
set_counters_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?
|
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?
|
prev_path = statuses_api_v1_account_url(since_id: @statuses.first.id) unless @statuses.empty?
|
||||||
|
|
|
@ -67,7 +67,8 @@ class MediaAttachment < ApplicationRecord
|
||||||
'vf' => 'scale=\'trunc(iw/2)*2:trunc(ih/2)*2\'',
|
'vf' => 'scale=\'trunc(iw/2)*2:trunc(ih/2)*2\'',
|
||||||
'vsync' => 'cfr',
|
'vsync' => 'cfr',
|
||||||
'b:v' => '1300K',
|
'b:v' => '1300K',
|
||||||
'crf' => 4,
|
'maxrate' => '500K',
|
||||||
|
'crf' => 6,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue