From 5c78547198de20e7f367adb142acc82cd80b4899 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 22 Nov 2016 23:18:54 +0100 Subject: More query optimizations --- app/models/feed.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/feed.rb') diff --git a/app/models/feed.rb b/app/models/feed.rb index e7f2ab3a5..6337726be 100644 --- a/app/models/feed.rb +++ b/app/models/feed.rb @@ -16,7 +16,7 @@ class Feed RegenerationWorker.perform_async(@account.id, @type) @statuses = Status.send("as_#{@type}_timeline", @account).paginate_by_max_id(limit, nil, nil) else - status_map = Status.where(id: unhydrated).with_includes.with_counters.map { |status| [status.id, status] }.to_h + status_map = Status.where(id: unhydrated).with_includes.map { |status| [status.id, status] }.to_h @statuses = unhydrated.map { |id| status_map[id] }.compact end -- cgit