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>2018-03-16 03:18:14 +0300
committerStan Hu <stanhu@gmail.com>2018-03-16 06:48:04 +0300
commit351d0c28dc8912075fdbb0a28e7356633c837931 (patch)
tree3f5e29f0a033faf4a6b39919ee7edb153336b39d /app/finders
parent16d92de1e2ef5c187f7826c5a15fbc2121273dde (diff)
Fix timeouts loading /admin/projects page
These extra sort keys caused sequential scans on the namespaces and projects page. Removing them makes the page load on GitLab.com. Closes #44338
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/admin/projects_finder.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/finders/admin/projects_finder.rb b/app/finders/admin/projects_finder.rb
index d6bcd939522..5c507fe8d50 100644
--- a/app/finders/admin/projects_finder.rb
+++ b/app/finders/admin/projects_finder.rb
@@ -16,8 +16,7 @@ class Admin::ProjectsFinder
items = by_archived(items)
items = by_personal(items)
items = by_name(items)
- items = sort(items)
- items.includes(:namespace).order("namespaces.path, projects.name ASC").page(params[:page])
+ sort(items).page(params[:page])
end
private