Skip to content

Don't call `#uniq` on a relation

username-removed-443319 requested to merge speed-up-members-dropdown into master

When there was no project, no search, and no current user or author param, the AutocompleteController would call #uniq! on a relation instead of an array. This performed the less-efficient SELECT DISTINCT when it wasn't even needed (because the query wouldn't return duplicates anyway - duplicates were only added by putting a user on top of the list).

Makes the worst case for https://gitlab.com/gitlab-org/gitlab-ce/issues/27085 better.

Merge request reports