IssueFinder: Investigate BannedUser performance
With !89051 (merged) we changed the way how issues created by banned users are filtered to (src)
scope :without_hidden, -> {
if Feature.enabled?(:ban_user_feature_flag)
where.not(author_id: Users::BannedUser.all.select(:user_id))
else
all
end
}
At the time it seemed unexpensive, but we now have > 30k banned users on .com
potentially slowing down certain certain queries (like e.g. issue count). We should investigate if that assumption is true and if it is, whether there are better strategies to filter out these issues.
See this relevant discussion: #383367 (comment 1182467577)
Edited by Lukas Eipert