mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: Simplify topic serialization for user summary page (#11236)
ListableTopicSerializer includes many attributes which we are not using, and is likely to cause N+1s when not used in conjunction with TopicQuery. Using the BasicTopicSerializer means that no other tables are required.
This commit is contained in:
parent
1a41a1cc43
commit
cac7ea35cf
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
class UserSummarySerializer < ApplicationSerializer
|
class UserSummarySerializer < ApplicationSerializer
|
||||||
|
|
||||||
class TopicSerializer < ListableTopicSerializer
|
class TopicSerializer < BasicTopicSerializer
|
||||||
attributes :category_id, :like_count
|
attributes :category_id, :like_count, :created_at
|
||||||
end
|
end
|
||||||
|
|
||||||
class ReplySerializer < ApplicationSerializer
|
class ReplySerializer < ApplicationSerializer
|
||||||
|
Loading…
Reference in New Issue
Block a user