summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-02-26 11:30:43 -0800
committerStan Hu <stanhu@gmail.com>2019-02-26 12:44:28 -0800
commitebb284c0dc59e2fd5bc76921609b60034f000c53 (patch)
treea80846427413ae82868fc391ecda6edab846eb28 /app/finders
parent3395eacb57285424b7b8d49bdf836f638af31e8c (diff)
downloadgitlab-ce-ebb284c0dc59e2fd5bc76921609b60034f000c53.tar.gz
Remove N+1 query for tags in /admin/runners page
As discussed in https://github.com/mbleigh/acts-as-taggable-on/issues/91, we can avoid N+1 queries if we use `tags` instead of `tag_list`. Seen while reviewing https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19740.
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/admin/runners_finder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/admin/runners_finder.rb b/app/finders/admin/runners_finder.rb
index fbb1cfc5c66..8d936b8121c 100644
--- a/app/finders/admin/runners_finder.rb
+++ b/app/finders/admin/runners_finder.rb
@@ -14,7 +14,7 @@ class Admin::RunnersFinder < UnionFinder
sort!
paginate!
- @runners
+ @runners.with_tags
end
def sort_key