Fix N+1 queries on milestone show pages
What
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/25832
Discovered while investigating https://gitlab.com/gitlab-org/gitlab-ce/issues/25748
4x speedup locally by adding .includes(:assignee, :labels, project: :namespace)
to app/views/shared/milestones/_tabs.html.haml:24. Probably quite rare that someone has 300 issues in a milestone, but if they do then this will help.
Versions affected
8.15, 8.14, 8.13, 8.12
Exists after security fixes to 8.14, 8.13, but also on all 8.12 releases somehow. Possibly was fixed in 8.13 and then the security fix caused a regression.
Severity
Minor. Might be exacerbated by https://gitlab.com/gitlab-org/gitlab-ce/issues/25748, so more important for versions 8.13 onwards where the security fix was applied.
Screenshot
Acceptance criteria
-
Changelog entry added - Tests
-
Added for this feature/bug (Ideally would be added, similar to https://gitlab.com/jamedjo/gitlab-ce/commit/4fca57a43d2f5979e974e50c3052cb4b47cd3686)
-
-
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together