Commit 5dea12ac authored by Stan Hu's avatar Stan Hu Committed by Rémy Coutable

Merge branch 'sh-optimize-label-finder' into 'master'

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
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 0778461d
...@@ -19,6 +19,7 @@ Please view this file on the master branch, on stable branches it's out of date. ...@@ -19,6 +19,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. !7068 - Fix reply-by-email not working due to queue name mismatch. !7068
- Fix 404 for group pages when GitLab setup uses relative url. !7071 - Fix 404 for group pages when GitLab setup uses relative url. !7071
- Fix `User#to_reference`. !7088 - Fix `User#to_reference`. !7088
- Reduce overhead of `LabelFinder` by avoiding `#presence` call. !7094
- Fix unauthorized users dragging on issue boards. !7096 - Fix unauthorized users dragging on issue boards. !7096
## 8.13.0 (2016-10-22) ## 8.13.0 (2016-10-22)
......
...@@ -50,7 +50,7 @@ class LabelsFinder < UnionFinder ...@@ -50,7 +50,7 @@ class LabelsFinder < UnionFinder
end end
def projects_ids def projects_ids
params[:project_ids].presence params[:project_ids]
end end
def title def title
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment