Improve pipeline creation service performance Closes #37987 See merge request gitlab-org/gitlab-ce!18582