diff options
author | Stan Hu <stanhu@gmail.com> | 2017-09-18 16:14:44 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-09-18 20:38:25 -0700 |
commit | 0a2f93aa6a791714fb35557f60b20a1a92682684 (patch) | |
tree | d7dd0c92393b9833401de30e058205a7966f20f1 | |
parent | f0b089cf7881a0eed7f3aefe22d5b3006a39023d (diff) | |
download | gitlab-ce-0a2f93aa6a791714fb35557f60b20a1a92682684.tar.gz |
Eliminate N+1 queries referencing issuessh-project-feature-eager-load
To load issue 1, we see that in #38033 that about 835 ms of the
SQL queries were due to loading ProjectFeature. We should be
able to cut this down by eagerly loading this information.
Closes #38033
-rw-r--r-- | changelogs/unreleased/sh-project-feature-eager-load.yml | 5 | ||||
-rw-r--r-- | lib/banzai/reference_parser/issue_parser.rb | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/changelogs/unreleased/sh-project-feature-eager-load.yml b/changelogs/unreleased/sh-project-feature-eager-load.yml new file mode 100644 index 00000000000..406ef119a14 --- /dev/null +++ b/changelogs/unreleased/sh-project-feature-eager-load.yml @@ -0,0 +1,5 @@ +--- +title: Eliminate N+1 queries referencing issues +merge_request: +author: +type: fixed diff --git a/lib/banzai/reference_parser/issue_parser.rb b/lib/banzai/reference_parser/issue_parser.rb index a65bbe23958..e0a8ca653cb 100644 --- a/lib/banzai/reference_parser/issue_parser.rb +++ b/lib/banzai/reference_parser/issue_parser.rb @@ -34,7 +34,8 @@ module Banzai { namespace: :owner }, { group: [:owners, :group_members] }, :invited_groups, - :project_members + :project_members, + :project_feature ] } ), |