Commit 024d10b7 authored by Robert Speicher's avatar Robert Speicher

Merge branch '38171-workaround' into 'master'

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

Closes #38171

See merge request gitlab-org/gitlab-ce!14455
parents 7cf8e098 a1f96aa2
...@@ -35,7 +35,10 @@ class Projects::TreeController < Projects::ApplicationController ...@@ -35,7 +35,10 @@ class Projects::TreeController < Projects::ApplicationController
end end
format.json do format.json do
render json: TreeSerializer.new(project: @project, repository: @repository, ref: @ref).represent(@tree) # 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 end
end end
......
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