Skip to content

Commit 351d0c2

Browse files
committed
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
1 parent 16d92de commit 351d0c2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/finders/admin/projects_finder.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ def execute
1616
items = by_archived(items)
1717
items = by_personal(items)
1818
items = by_name(items)
19-
items = sort(items)
20-
items.includes(:namespace).order("namespaces.path, projects.name ASC").page(params[:page])
19+
sort(items).page(params[:page])
2120
end
2221

2322
private
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Fix timeouts loading /admin/projects page
3+
merge_request:
4+
author:
5+
type: performance

0 commit comments

Comments
 (0)