Commit 615ba007 authored by Yorick Peterse's avatar Yorick Peterse

Eager load namespace owners for project dashboards

This solves an N+1 query problem where we'd run multiple queries when
getting the namespace owners of the displayed projects.
parent 5cc140b2
......@@ -48,7 +48,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
ProjectsFinder
.new(params: finder_params, current_user: current_user)
.execute
.includes(:route, :creator, namespace: :route)
.includes(:route, :creator, namespace: [:route, :owner])
end
def load_events
......
---
title: Eager load namespace owners for project dashboards
merge_request:
author:
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment