Slow Chain::ComponentUsage on pipeline creation
Summary
While working on the incident #inc-5358-increase-in-timeout-error-processing-external-cicd-included-yaml-f and https://gitlab.com/gitlab-com/request-for-help/-/issues/3547, I realized that Chain::ComponentUsage is slow.
https://log.gprd.gitlab.net/app/r/s/2T6vm
Sometimes 10> seconds!
I recently added Chain::ComponentUsage to our dashboard on https://log.gprd.gitlab.net/app/r/s/r5Owf.
Proposal
Extract the logic into a worker.
Edited by 🤖 GitLab Bot 🤖


