about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-04-14 01:06:10 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:21 -0500
commit6c7f1691eef8f2cfe299373560966bfac6219056 (patch)
tree7257bbaa7c94a6b1a8f7ecc52f5369428e7d1a93 /app/models
parent16147d73a26e8935897795a05423eba3a1ee78d2 (diff)
Only consider favorites for community-curated world timeline until we can make the query for considering boosts not be so abysmally slow.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/status.rb15
1 files changed, 8 insertions, 7 deletions
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