Skip to content

Don't use ProjectsFinder in TodosFinder

Yorick Peterse requested to merge remove-projects-finder-from-todos-finder into master

What does this MR do?

Using ProjectsFinder in TodosFinder to limit todos to the right projects leads to overly complicated and slow database queries. This commit removes the use of ProjectsFinder in favour of using Project.public_or_visible_to_current_user directly.

Per https://gitlab.com/gitlab-com/infrastructure/issues/3772#note_61217294 getting rid of the redundant AND (mentioned in https://gitlab.com/gitlab-org/gitlab-ce/issues/43767) appears to cut query timings in half.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

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

Edited by Yorick Peterse

Merge request reports