Commit a1f96aa2 authored by Andrew Newdigate's avatar Andrew Newdigate

Workaround for n+1 in Projects::TreeController#show

See https://gitlab.com/gitlab-org/gitlab-ce/issues/38261
parent f9df0e13
......@@ -35,10 +35,13 @@ class Projects::TreeController < Projects::ApplicationController
end
format.json do
# n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/38261
Gitlab::GitalyClient.allow_n_plus_1_calls do
render json: TreeSerializer.new(project: @project, repository: @repository, ref: @ref).represent(@tree)
end
end
end
end
def create_dir
return render_404 unless @commit_params.values.all?
......
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