Fix N+1 problem in CustomEmojiFilter
Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/271242 **Problem** I discovered repetitive `SELECT 1 AS one FROM "custom_emoji" WHERE "custom_emoji"."namespace_id" = <id> LIMIT 1` queries generated by CustomEmojiFilter. **Solution** - Update test to catch N+1 queries - Add memoization to prevent them
Showing
Please register or sign in to comment