Reduce queries in spec/requests/api/merge_requests_spec.rb
What does this MR do?
This reduces the queries from 97137 to 65136 and the query time from
02:04 to 01:27 in spec/requests/api/merge_requests.rb
.
What are the relevant issue numbers?
No issue number, this file is one of the main offenders in the "# of queries" category here: https://redash.gitlab.com/dashboard/test-suite-statistics
Does this MR meet the acceptance criteria?
-
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Security reports checked/validated by reviewer