Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-10-25 11:37:16 +0300
committerStan Hu <stanhu@gmail.com>2016-10-25 16:52:44 +0300
commited47f4a30891529eac2fcc99a344038bf3793cc4 (patch)
treead0d3c76691cead4043adc2aabdae567667bc8a7
parentadd3a2c4431f29ca84c956f5604769505f0f0904 (diff)
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 the system so that #presence and hence to_a isn't called. Closes #23684
-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 86878e5af6c..8ae39105ffc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,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
- Better handle when no users were selected for adding to group or project. (Linus Thiel)
diff --git a/app/finders/labels_finder.rb b/app/finders/labels_finder.rb
index 6ace14a4bb5..44c659b609a 100644
--- a/app/finders/labels_finder.rb
+++ b/app/finders/labels_finder.rb
@@ -48,7 +48,7 @@ class LabelsFinder < UnionFinder
end
def projects_ids
- params[:project_ids].presence
+ params[:project_ids]
end
def title