mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:08:26 +00: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…
x
Reference in New Issue
Block a user