Resolve "Controller Projects::MergeRequestsController#ci_environments_status.json executes more than 100 SQL queries"
What does this MR do?
This is a first crack at reducing the number of queries in Projects::MergeRequestsController#ci_environments_status.json
It optimizes a small set of queries by caching the service templates query, and only building services when necessary (which caused a query per service).
What are the relevant issue numbers?
Closes #43109 (closed)
Does this MR meet the acceptance criteria?
[ ] Changelog entry added, if necessary[ ] Documentation created/updated[ ] Tests added for this feature/bug-
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides
Edited by Brett Walker