diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2019-08-27 09:41:38 +0300 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2019-08-27 09:41:38 +0300 |
commit | f91b5d5840996736ee18ef457653cdd225f8445f (patch) | |
tree | fea494a3ece52fe6a972ef7ae3d85ed1a665aef1 /app | |
parent | b23dbdf41a047bcf9c001cc34b88a3ce05b69d75 (diff) | |
parent | 29e60b0643ca5451919df233a9aeb4825779e846 (diff) |
Merge branch 'sh-project-feature-nplus-one' into 'master'
Remove N+1 SQL query loading project feature in dashboard
Closes #66482
See merge request gitlab-org/gitlab-ce!32169
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/dashboard/projects_controller.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/dashboard/projects_controller.rb b/app/controllers/dashboard/projects_controller.rb index 71f18694613..1dc89943f7f 100644 --- a/app/controllers/dashboard/projects_controller.rb +++ b/app/controllers/dashboard/projects_controller.rb @@ -70,6 +70,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController .new(params: finder_params, current_user: current_user) .execute .includes(:route, :creator, :group, namespace: [:route, :owner]) + .preload(:project_feature) .page(finder_params[:page]) prepare_projects_for_rendering(projects) |