mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: Faster TL3 promotion replies needed calculation (#10416)
Removing the LIMIT makes PostgreSQL use index_posts_on_user_id_and_created_at which is much faster overall. Before: 22 seconds After: 100 ms
This commit is contained in:
committed by
GitHub
parent
00a0767c35
commit
28669dfeb2
@@ -91,7 +91,7 @@ class Promotion
|
||||
return false if stat.days_visited < SiteSetting.tl2_requires_days_visited
|
||||
return false if stat.likes_received < SiteSetting.tl2_requires_likes_received
|
||||
return false if stat.likes_given < SiteSetting.tl2_requires_likes_given
|
||||
return false if stat.calc_topic_reply_count!(SiteSetting.tl2_requires_topic_reply_count) < SiteSetting.tl2_requires_topic_reply_count
|
||||
return false if stat.calc_topic_reply_count! < SiteSetting.tl2_requires_topic_reply_count
|
||||
|
||||
true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user