diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-01-06 17:33:43 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-01-07 14:53:02 +0100 |
commit | fc443ea7bcdd7255745cd1811c8bc95546ae3b12 (patch) | |
tree | 0f96648ca3f0d6dec7a9b5bcf5b085bebdf1fdcb /app | |
parent | 0d0049c0584be2d358048c3cc545406b64bf3826 (diff) | |
download | gitlab-ce-fc443ea7bcdd7255745cd1811c8bc95546ae3b12.tar.gz |
Drop projects order in IssuableFinder
When grabbing the projects to filter issues by we don't care about the
order they're returned in. By removing the ORDER BY the resulting query
can be quite a bit faster.
Diffstat (limited to 'app')
-rw-r--r-- | app/finders/issuable_finder.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb index 3d5e8b6fbe7..4d56b48e3f8 100644 --- a/app/finders/issuable_finder.rb +++ b/app/finders/issuable_finder.rb @@ -79,9 +79,9 @@ class IssuableFinder if project? @projects = project elsif current_user && params[:authorized_only].presence && !current_user_related? - @projects = current_user.authorized_projects + @projects = current_user.authorized_projects.reorder(nil) else - @projects = ProjectsFinder.new.execute(current_user) + @projects = ProjectsFinder.new.execute(current_user).reorder(nil) end end |