Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7bbf4dc4
Commit
7bbf4dc4
authored
Jul 14, 2020
by
Dmitry Gruzd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix N+1 in the RootController#index
parent
f37dd23d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
ee/app/controllers/ee/dashboard/projects_controller.rb
ee/app/controllers/ee/dashboard/projects_controller.rb
+1
-0
ee/app/models/ee/project.rb
ee/app/models/ee/project.rb
+2
-0
ee/changelogs/unreleased/fix-root-controller-n-plus-1.yml
ee/changelogs/unreleased/fix-root-controller-n-plus-1.yml
+5
-0
No files found.
ee/app/controllers/ee/dashboard/projects_controller.rb
View file @
7bbf4dc4
...
...
@@ -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
...
...
ee/app/models/ee/project.rb
View file @
7bbf4dc4
...
...
@@ -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
...
...
ee/changelogs/unreleased/fix-root-controller-n-plus-1.yml
0 → 100644
View file @
7bbf4dc4
---
title
:
Fix N+1 in the RootController#index
merge_request
:
36805
author
:
type
:
performance
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment