From 6c7f1691eef8f2cfe299373560966bfac6219056 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sun, 14 Apr 2019 01:06:10 -0500 Subject: Only consider favorites for community-curated world timeline until we can make the query for considering boosts not be so abysmally slow. --- app/models/status.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'app/models/status.rb') diff --git a/app/models/status.rb b/app/models/status.rb index c134926c8..5410c3098 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -386,15 +386,16 @@ class Status < ApplicationRecord .where(account_id: Account.local) .reorder(:status_id) .distinct + + # We need to find a new way to do this because it's much too slow. + # grab the stuff we boosted - boost_query = query.reblogs.select(:reblog_of_id) - .reorder(nil) - .distinct + #boost_query = query.reblogs.select(:reblog_of_id) + # .reorder(nil) + # .distinct # map those ids to actual statuses - # THIS QUERY IS EXPENSIVE AS FUCK!!!!!!! - # but it does the job - query = Status.where(id: boost_query) - .or(where(id: fav_query)) + + query = Status.where(id: fav_query) .without_replies .with_public_visibility end -- cgit