N+1 in tags list view
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=273732) </details> <!--IssueSummary end--> https://gitlab.com/gitlab-org/gitlab/-/tags repeats the same query 40 times: ``` SELECT "protected_tags"."name" FROM "protected_tags" WHERE "protected_tags"."project_id" = 278964 ``` ![Screen_Shot_2020-10-30_at_8.20.49_PM](/uploads/ebbe321b23aee3f48184d698a22a3556/Screen_Shot_2020-10-30_at_8.20.49_PM.png) ## Details ``` [ "app/models/concerns/protected_ref.rb:62:in `matching'", "app/models/protected_tag.rb:13:in `protected?'", "app/helpers/tags_helper.rb:29:in `protected_tag?'", "app/views/projects/tags/_tag.html.haml:9", "app/views/projects/tags/index.html.haml:37", "app/controllers/application_controller.rb:134:in `render'", "ee/lib/gitlab/ip_address_state.rb:10:in `with'", "ee/app/controllers/ee/application_controller.rb:44:in `set_current_ip_address'", "app/controllers/application_controller.rb:493:in `set_current_admin'", "lib/gitlab/session.rb:11:in `with_session'", "app/controllers/application_controller.rb:484:in `set_session_storage'", "app/controllers/application_controller.rb:478:in `set_locale'", "lib/gitlab/error_tracking.rb:52:in `with_context'", "app/controllers/application_controller.rb:543:in `sentry_context'", "app/controllers/application_controller.rb:471:in `block in set_current_context'", "lib/gitlab/application_context.rb:54:in `block in use'", "lib/gitlab/application_context.rb:54:in `use'", "lib/gitlab/application_context.rb:21:in `with_context'", "app/controllers/application_controller.rb:463:in `set_current_context'", "ee/lib/omni_auth/strategies/group_saml.rb:41:in `other_phase'", "lib/gitlab/jira/middleware.rb:19:in `call'" ] ```
issue