Skip to content

Memoize Milestoneish#issues_visible_to_user to reduce lookups

James EJ requested to merge jej-memoize-milestoneish-visible-to-user into master

What does this MR do?

https://gitlab.com/gitlab-org/gitlab-ce/issues/25748

Milestones page are erroring out with 502 due to Milestoneish#issues_visible_to_user taking too long.This patch attempts to provide a temporary improvement by reducing the number of times it is called, and speeding up the SQL query when it is on an individual milestone.

GlobalMilestones used on the Dashboard and in Groups still have a very slow SQL query so the issue is being left open.

Versions affected

8.13, 8.14. 8.15

Severity

Important, partially fixes broken milestones index.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/25748

Merge request reports