Skip to content
Snippets Groups Projects
Commit e4b69bc2 authored by Andrew Newdigate's avatar Andrew Newdigate
Browse files

Allow n+1s caused by avatar fetches on the project dashboard. See...

Allow n+1s caused by avatar fetches on the project dashboard. See https://gitlab.com/gitlab-org/gitlab-ce/issues/38261
parent 4d88f649
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -534,8 +534,11 @@ class Repository
cache_method :tag_count, fallback: 0
 
def avatar
if tree = file_on_head(:avatar)
tree.path
# n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/38327
Gitlab::GitalyClient.allow_n_plus_1_calls do
if tree = file_on_head(:avatar)
tree.path
end
end
end
cache_method :avatar
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment