mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
PERF: use preloader trick to load topic categories
This commit is contained in:
parent
c059352484
commit
6f7a89dcaa
1 changed files with 2 additions and 1 deletions
|
@ -115,7 +115,8 @@ class CategoryList
|
|||
topics_in_cat.each do |topic_id|
|
||||
topic = @topics_by_id[topic_id]
|
||||
if topic.present? && @guardian.can_see?(topic)
|
||||
topic.category = c
|
||||
# topic.category is very slow under rails 4.2
|
||||
topic.association(:category).target = c
|
||||
c.displayable_topics << topic
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue