Skip to content

Fix N+1 queries on milestone show pages

James EJ requested to merge jej-fix-n+1-queries-milestones-show into master

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

Screen_Shot_2016-12-19_at_20.31.08__50_

Acceptance criteria

Merge request reports

Loading