IssuableFinder could accept projects: param for performance

What

IssuableFinder could accept a project: param to take preference over project_id:. The idea is to avoid repeated and over complicated project lookups, but must ensure that permissions are maintained.

Why

IssuableFinder created very complicated queries which are not performant. This has lead to milestones pages timing out (https://gitlab.com/gitlab-org/gitlab-ce/issues/25748) amongst other slowdowns. Passing in projects might mean that better queries are created such as in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8524.

For example, Groups::ApplicationController currently uses GroupProjectsFinder which is then repeated in IssuableFinder#projects. Even if it doesn't help performance it might simplify things.

References

Originally mentioned in https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024

Edited May 28, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading