Commit 7bbf4dc4 authored by Dmitry Gruzd's avatar Dmitry Gruzd

Fix N+1 in the RootController#index

parent f37dd23d
......@@ -11,6 +11,7 @@ module EE
override :preload_associations
def preload_associations(projects)
super.with_compliance_framework_settings
.with_group_saml_provider
end
end
end
......
......@@ -145,6 +145,8 @@ module EE
scope :with_compliance_framework_settings, -> { preload(:compliance_framework_setting) }
scope :has_vulnerabilities, -> { joins(:vulnerabilities).group(:id) }
scope :with_group_saml_provider, -> { preload(group: :saml_provider) }
delegate :shared_runners_minutes, :shared_runners_seconds, :shared_runners_seconds_last_reset,
to: :statistics, allow_nil: true
......
---
title: Fix N+1 in the RootController#index
merge_request: 36805
author:
type: performance
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