mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Replace Hash#keys.each with Hash#each_key for some perf boost
This commit is contained in:
@@ -33,7 +33,7 @@ class ScoreCalculator
|
||||
|
||||
def update_posts_score(min_topic_age)
|
||||
components = []
|
||||
@weightings.keys.each { |k| components << "COALESCE(#{k}, 0) * :#{k}" }
|
||||
@weightings.each_key { |k| components << "COALESCE(#{k}, 0) * :#{k}" }
|
||||
components = components.join(" + ")
|
||||
|
||||
builder = SqlBuilder.new(
|
||||
|
||||
Reference in New Issue
Block a user