現在遅いのはApi::V1::NotificationsController#indexとApi::V1::Timelines::PublicController#showあたり。 https://mastodon.zunda.ninja/media/Zy7q-wXM3wNa0xVgb8M
Api::V1::NotificationsController#indexで遅いのはapp/controllers/api/v1/notifications_controller.rbからdef browserable_account_notificationsと辿ってcurrent_account.notificationsあたりかなあ。実装はapp/models/account.rbのhas_many :notificationsっぽい (たいへん)。