summaryrefslogtreecommitdiff
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
parent9c7b371a909250d0668a8dc728ccdea69798cc14 (diff)
parented47f4a30891529eac2fcc99a344038bf3793cc4 (diff)
downloadgitlab-ce-23794-hovers-don-t-go-away.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
-rw-r--r--CHANGELOG.md1
-rw-r--r--app/finders/labels_finder.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 85cdb0e1ab7..289919776eb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,7 @@ Please view this file on the master branch, on stable branches it's out of date.
- Fix reply-by-email not working due to queue name mismatch
- Fixed hidden pipeline graph on commit and MR page !6895
- Expire and build repository cache after project import
+ - Reduce overhead of LabelFinder by avoiding #presence call !7094
- Fix 404 for group pages when GitLab setup uses relative url
- Simpler arguments passed to named_route on toggle_award_url helper method
- Fix unauthorized users dragging on issue boards
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