Draft: PoC N+1 fixes for project dashboard
What does this MR do and why?
This is a set of PoC fixes for each of the remaining known N+1 queries in the project dashboard, see #214037 for more context.
This MR is not for merging but for test failure discovery and to start the discussion on some of these proposed changes. Overview of the changes:
- Eliminates a false positive N+1 by ensuring creator and owner are different in the control set
- Uses
Preloaders::UsersMaxAccessLevelInProjectsPreloader
to correctly preload the max access level (this wasn't working before) - Batches merge request counts. This bypasses an existing cache and probably needs to get the same treatment as
Project#open_issue_count
which usesProjects::BatchOpenIssueCountService
- Changes
Gitlab::Cache::Ci::ProjectPipelineStatus
to be a drop-in replacement forCi::Pipeline
for the purpose of status rendering and replacesproject.last_pipeline
withproject.pipeline_status
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Hordur Freyr Yngvason