BigW Consortium Gitlab
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.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
artifact_blob.rb | Loading commit data... | |
build.rb | Loading commit data... | |
build_trace_section.rb | Loading commit data... | |
build_trace_section_name.rb | Loading commit data... | |
group.rb | Loading commit data... | |
group_variable.rb | Loading commit data... | |
legacy_stage.rb | Loading commit data... | |
pipeline.rb | Loading commit data... | |
pipeline_schedule.rb | Loading commit data... | |
pipeline_schedule_variable.rb | Loading commit data... | |
pipeline_variable.rb | Loading commit data... | |
runner.rb | Loading commit data... | |
runner_project.rb | Loading commit data... | |
stage.rb | Loading commit data... | |
trigger.rb | Loading commit data... | |
trigger_request.rb | Loading commit data... | |
variable.rb | Loading commit data... |