diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-07-23 11:28:22 +0200 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-07-24 16:24:28 +0200 |
commit | 8d1e97fc3b9af28d2a34d2b16239e52d3b5d0303 (patch) | |
tree | c92a0bb3e09401c0c8e793cafc23b061d53a532e /spec/lib/gitlab/utils/override_spec.rb | |
parent | 5e102f17f0ef16d0fd1eff98b9229fea2bc1fec9 (diff) | |
download | gitlab-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/utils/override_spec.rb')
0 files changed, 0 insertions, 0 deletions