mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
PERF: Drop support for gaps in mega topics.
Based on our current implementation, there isn't a practical way to determine the gaps of large topics cheaply. We tried to load the gaps in chunks but felt that the code becomes too complicated. Note that megatopics are quite rare in the wild.
This commit is contained in:
parent
f2cc05c6c6
commit
b4e1388f9b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user