Commit 2a3be447 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Remove preloading of forks in projects API

We don't need to load all the forks to generate the forks_count because
we do a separate query to do this efficiently

Changelog: performance
MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62602
parent 23577fbc
...@@ -136,7 +136,7 @@ module API ...@@ -136,7 +136,7 @@ module API
.preload(project_group_links: { group: :route }, .preload(project_group_links: { group: :route },
fork_network: :root_project, fork_network: :root_project,
fork_network_member: :forked_from_project, fork_network_member: :forked_from_project,
forked_from_project: [:route, :forks, :tags, :group, :project_feature, namespace: [:route, :owner]]) forked_from_project: [:route, :tags, :group, :project_feature, namespace: [:route, :owner]])
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
......
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