summaryrefslogtreecommitdiff
path: root/lib/gitlab/git/rugged_impl/tree.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/git/rugged_impl/tree.rb')
-rw-r--r--lib/gitlab/git/rugged_impl/tree.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/gitlab/git/rugged_impl/tree.rb b/lib/gitlab/git/rugged_impl/tree.rb
index c1205bca1d2..f6ddc4e4346 100644
--- a/lib/gitlab/git/rugged_impl/tree.rb
+++ b/lib/gitlab/git/rugged_impl/tree.rb
@@ -33,9 +33,11 @@ module Gitlab
end
end
- # This is an optimization to reduce N+1 queries for Gitaly. It's
- # currently done in TreeHelper#flatten_tree, but to emulate Gitaly
- # as much as possible we populate the value here.
+ # This was an optimization to reduce N+1 queries for Gitaly
+ # (https://gitlab.com/gitlab-org/gitaly/issues/530). It
+ # used to be done lazily in the view via
+ # TreeHelper#flatten_tree, so it's possible there's a
+ # performance impact by loading this eagerly.
rugged_populate_flat_path(repository, sha, path, ordered_entries)
end