Skip to content

A platform for community discussion. Free, open, simple.

PERF: Drop support for gaps in mega topics.

Guo Xiang Tanb4e1388f9beb
diff --git a/lib/topic_view.rb b/lib/topic_view.rb
index b08eba259f6..26c4b6a96aa 100644
--- a/lib/topic_view.rb
+++ b/lib/topic_view.rb
@@ -104,7 +104,14 @@ class TopicView
def gaps
return unless @contains_gaps
- @gaps ||= Gaps.new(filtered_post_ids, unfiltered_posts.order(:sort_order).pluck(:id))
+
+ @gaps ||= begin
+ if is_mega_topic?
+ nil
+ else
+ Gaps.new(filtered_post_ids, unfiltered_posts.order(:sort_order).pluck(:id))
+ end
+ end
end
def last_post