Investigate fixes for slow loading of pipelines tab for merge requests
Screen_Recording_2021-09-22_at_2.14.08_PM
For some merge requests in https://gitlab.com/gitlab-org/gitlab, viewing the list of pipelines is very slow.
Example: !69037 (closed) has only 25 pipelines but it takes ~35 seconds to render the first 20 pipelines. See attached video for example.
I have seen this happen in other GitLab MRs too - in the context of GitLab this MR is average. Not sure if this happens in other smaller projects.
Some extra context
Most of the time, I want to do two things in this view :
- Click the "Run pipeline" button
- View the specifics for the last pipeline
The specifics for the 19 other pipelines is less important to me.
Proposed solution
Investigate possible solutions for improving the load time, and implement reasonable options.
Possible improvements
- Backend: Convert the endpoint called by MR pipe... (#300908)
- Implement fast path generators for
JobEntity
and others (see a11551c2 as an example) (from #207994 (comment 300073966)) - Optimize the
can?
check by caching the user's permission to:update_build
by ref name (from #207994 (comment 300073966)) - Store or cache state of archived builds instead of relying on
degenerated?
(from #207994 (comment 300073966)) - Load the run pipeline button independent of loading the rest of the pipeline data (from #341462 (comment 688272868))
Edited by James Heimbuck