summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-10-25 15:55:59 +0000
committerStan Hu <stanhu@gmail.com>2016-10-25 15:55:59 +0000
commit279ffe7bff112a86454bd37ce4023bf415205822 (patch)
tree63844c09b80b5073fc15b0601a7ec690328f6877 /app/finders
parent9c7b371a909250d0668a8dc728ccdea69798cc14 (diff)
parented47f4a30891529eac2fcc99a344038bf3793cc4 (diff)
downloadgitlab-ce-279ffe7bff112a86454bd37ce4023bf415205822.tar.gz
Merge branch 'sh-optimize-label-finder' into 'master' 23794-hovers-don-t-go-away
Reduce overhead of LabelFinder by avoiding #presence call Some users experienced 502 timeouts when viewing group labels. Labels#open_issues_count and Label#open_merge_requests_count were taking a long time to load because they were loading every ActiveRecord of the user-accessible projects into memory. This change modifies so that only the IDs are loaded into memory. Closes #23684 See merge request !7094
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/labels_finder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/labels_finder.rb b/app/finders/labels_finder.rb
index 95e62cdb02a..44484d64567 100644
--- a/app/finders/labels_finder.rb
+++ b/app/finders/labels_finder.rb
@@ -50,7 +50,7 @@ class LabelsFinder < UnionFinder
end
def projects_ids
- params[:project_ids].presence
+ params[:project_ids]
end
def title