mirror of
https://github.com/discourse/discourse.git
synced 2025-06-23 01:32:49 +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:
@ -4,4 +4,12 @@ class SearchTopicListItemSerializer < ListableTopicSerializer
|
||||
include TopicTagsMixin
|
||||
|
||||
attributes :category_id
|
||||
|
||||
def include_image_url?
|
||||
false
|
||||
end
|
||||
|
||||
def include_thumbnails?
|
||||
false
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user