54f1e406f4
This changes Ci::Pipeline#latest_builds_with_artifacts so it returns an Array instead of a relation. Whenever we use this data we do so in two steps: 1. Count the number of rows 2. If this number is greater than 0, iterate over the rows By returning an Array instead we only execute 1 query of which the total time/work is less than running either just a COUNT(*) or both queries (in the worst case). On GitLab.com this change should save us a few milliseconds per request to ProjectsController#show. |
||
---|---|---|
.. | ||
artifact_blob.rb | ||
build.rb | ||
build_trace_section.rb | ||
build_trace_section_name.rb | ||
group.rb | ||
group_variable.rb | ||
legacy_stage.rb | ||
pipeline.rb | ||
pipeline_schedule.rb | ||
pipeline_schedule_variable.rb | ||
pipeline_variable.rb | ||
runner.rb | ||
runner_project.rb | ||
stage.rb | ||
trigger.rb | ||
trigger_request.rb | ||
variable.rb |