Perf: SemesterProcess new - GET /semester_processes/new
trace-semester_processes-new-2023-01-17T210705_0100.log
GET /semester_processes/new(.:format) semester_processes#new
params:
semester: '2022,2'
controller: semester_processes
action: new
duration: 12.778534
Total allocated: 1.08 GB (4322312 objects)
Total retained: 23.47 MB (267841 objects)
Since this task is a periodic thing, they want to do on two dates during the year, I think this could be refactored to be prepared for them on the day they wish by scheduled task.
And I think the queries in there could probably also be faster, if .eager_load
or .includes
are done at the right places in the right manner.
Edited by Kaspar Vollenweider