A platform for community discussion. Free, open, simple.
PERF: Update `TopicView#participant_count` to use `Topic#posts_count`.
Guo Xiang Taneb427f7cf4bf
diff --git a/lib/topic_view.rb b/lib/topic_view.rbindex be2819d8e1e..09c9b2620ec 100644--- a/lib/topic_view.rb+++ b/lib/topic_view.rb@@ -310,7 +310,7 @@ class TopicView@participant_count ||=beginif participants.size == MAX_PARTICIPANTS- if unfiltered_post_ids.length > MAX_POSTS_COUNT_PARTICIPANTS+ if @topic.posts_count > MAX_POSTS_COUNT_PARTICIPANTS@topic.participant_countelsesql = <<~SQL