PERF: Remove total for time to first response report. (#17082)

The query is very inefficient without any constraints on large sites and
the average of all time to first response since the beginning of time is
not useful as well.
This commit is contained in:
Alan Guo Xiang Tan 2022-06-14 11:27:48 +08:00 committed by GitHub
parent f313276966
commit 0ae7b43018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 2 deletions

View File

@ -17,8 +17,6 @@ module Reports::TimeToFirstResponse
report.data << { x: r['date'], y: r['hours'].to_f.round(2) }
end
report.total = Topic.time_to_first_response_total(category_id: category_id, include_subcategories: include_subcategories)
report.prev30Days = Topic.time_to_first_response_total(start_date: report.start_date - 30.days, end_date: report.start_date, category_id: category_id, include_subcategories: include_subcategories)
end
end