2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

PERF: Remove N+1 queries on topic list page.

This commit is contained in:
Vinoth Kannan 2018-02-23 20:05:51 +05:30
parent a1ea477604
commit 43f0884660

View file

@ -8,7 +8,8 @@ module TopicTagsMixin
end
def tags
topic.tags.pluck(:name)
# Calling method `pluck` along with `includes` causing N+1 queries
topic.tags.map(&:name)
end
def topic