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_spec.rb | Loading commit data... | |
build_spec.rb | Loading commit data... | |
build_trace_section_name_spec.rb | Loading commit data... | |
build_trace_section_spec.rb | Loading commit data... | |
group_spec.rb | Loading commit data... | |
group_variable_spec.rb | Loading commit data... | |
legacy_stage_spec.rb | Loading commit data... | |
pipeline_schedule_spec.rb | Loading commit data... | |
pipeline_schedule_variable_spec.rb | Loading commit data... | |
pipeline_spec.rb | Loading commit data... | |
pipeline_variable_spec.rb | Loading commit data... | |
runner_spec.rb | Loading commit data... | |
stage_spec.rb | Loading commit data... | |
trigger_request_spec.rb | Loading commit data... | |
trigger_spec.rb | Loading commit data... | |
variable_spec.rb | Loading commit data... |