diff options
author | Sean McGivern <sean@gitlab.com> | 2017-05-02 17:29:45 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-05-02 17:35:19 +0100 |
commit | 52d049b4f82b1a3ed358188e02ab3518e5eae5fa (patch) | |
tree | 19a0d52cb4910921d5c4599eb21de02ca35bc987 /lib/banzai | |
parent | 6277bda61c511696f9d12fae4238b5214a722571 (diff) | |
download | gitlab-ce-52d049b4f82b1a3ed358188e02ab3518e5eae5fa.tar.gz |
Remove N+1 queries when checking nodes visible to userfix-n-plus-one-project-features
N in this case is low, as it's the number of distinct projects referenced from
MRs, rather than the number of MRs referenced (issues use their own
optimization). Still, on issues or MRs which are often referenced from MRs, it
will save a few queries.
Diffstat (limited to 'lib/banzai')
-rw-r--r-- | lib/banzai/reference_parser/merge_request_parser.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/banzai/reference_parser/merge_request_parser.rb b/lib/banzai/reference_parser/merge_request_parser.rb index 84a28b33d7c..8b0662749fd 100644 --- a/lib/banzai/reference_parser/merge_request_parser.rb +++ b/lib/banzai/reference_parser/merge_request_parser.rb @@ -33,7 +33,8 @@ module Banzai { namespace: :owner }, { group: [:owners, :group_members] }, :invited_groups, - :project_members + :project_members, + :project_feature ] }), self.class.data_attribute |