mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
PERF: Limit new messages in suggested for PMs
unlimited the query will hunt for ancient old PMs which is very expensive
This commit is contained in:
parent
076f079d17
commit
b839493fea
1 changed files with 1 additions and 1 deletions
|
@ -731,7 +731,7 @@ class TopicQuery
|
||||||
|
|
||||||
def new_messages(params)
|
def new_messages(params)
|
||||||
|
|
||||||
TopicQuery.new_filter(messages_for_groups_or_user(params[:my_group_ids]), 10.years.ago)
|
TopicQuery.new_filter(messages_for_groups_or_user(params[:my_group_ids]), Time.at(SiteSetting.min_new_topics_time).to_datetime)
|
||||||
.limit(params[:count])
|
.limit(params[:count])
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue