mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 10:52:45 +08:00
PERF: Exclude image_url
and thumbnails
from SearchTopicListItemSerializer
.
The attributes are not used and was resulting in N+1 queries.
This commit is contained in:
parent
093ee1d80c
commit
01a722885d
|
@ -4,4 +4,12 @@ class SearchTopicListItemSerializer < ListableTopicSerializer
|
|||
include TopicTagsMixin
|
||||
|
||||
attributes :category_id
|
||||
|
||||
def include_image_url?
|
||||
false
|
||||
end
|
||||
|
||||
def include_thumbnails?
|
||||
false
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user