summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/popen_spec.rb
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-07-23 11:28:22 +0200
committerKamil Trzciński <ayufan@ayufan.eu>2019-07-24 16:24:28 +0200
commit8d1e97fc3b9af28d2a34d2b16239e52d3b5d0303 (patch)
treec92a0bb3e09401c0c8e793cafc23b061d53a532e /spec/lib/gitlab/popen_spec.rb
parent5e102f17f0ef16d0fd1eff98b9229fea2bc1fec9 (diff)
downloadgitlab-ce-8d1e97fc3b9af28d2a34d2b16239e52d3b5d0303.tar.gz
Optimise import performanceoptimise-import-performance
- Fix `O(n)` complexity of `append_or_update_attribute`, we append objects to an array and re-save project - Remove the usage of `keys.include?` as it performs `O(n)` search, instead use `.has_key?` - Remove the usage of `.keys.first` as it performs a copy of all keys, instead use `.first.first`
Diffstat (limited to 'spec/lib/gitlab/popen_spec.rb')
0 files changed, 0 insertions, 0 deletions