mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 18:24:52 -06:00
PERF: Memoize TopicView#gaps
results.
This commit is contained in:
parent
6ddd214476
commit
5cef4e281b
@ -103,7 +103,7 @@ class TopicView
|
||||
|
||||
def gaps
|
||||
return unless @contains_gaps
|
||||
Gaps.new(filtered_post_ids, unfiltered_posts.order(:sort_order).pluck(:id))
|
||||
@gaps ||= Gaps.new(filtered_post_ids, unfiltered_posts.order(:sort_order).pluck(:id))
|
||||
end
|
||||
|
||||
def last_post
|
||||
|
Loading…
Reference in New Issue
Block a user