Skip to content

Draft: Reduce redundant preloads in PipelineSerializer

What does this MR do and why?

Have a look at !136089 for an example of a very slow page (see flamegraph)

Various pages listing pipelines get extremely slow when the pipelines have a lot of builds, especially if they also have downstream pipelines with a lot of builds. This is wasteful because the preloaded builds are not actually used (a second request fetches the builds per stage instead), and we currently render at most 3 downstream pipelines per top-level pipeline.

By removing a few unused preloads, and reducing the number of downstream pipelines loaded on the page, we can drastically reduce the load time of these lists.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Compare the wall flamegraph for pipelines.json before and after. Observe that the endpoint is much faster and does much less work:

Before After
Screenshot_2024-01-18_at_18.29.34 Screenshot_2024-01-18_at_18.27.41

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Hordur Freyr Yngvason

Merge request reports