diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2019-08-27 06:41:38 +0000 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2019-08-27 06:41:38 +0000 |
commit | f91b5d5840996736ee18ef457653cdd225f8445f (patch) | |
tree | fea494a3ece52fe6a972ef7ae3d85ed1a665aef1 /app/controllers | |
parent | b23dbdf41a047bcf9c001cc34b88a3ce05b69d75 (diff) | |
parent | 29e60b0643ca5451919df233a9aeb4825779e846 (diff) | |
download | gitlab-ce-f91b5d5840996736ee18ef457653cdd225f8445f.tar.gz |
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/controllers')
-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) |