Commit e3441dd6 authored by andysoiron's avatar andysoiron

Improve hooks view performance

`.count` always executes an SQL query.
The records need to be loaded anyway
so using `load.size` would save us one query.
parent 77885f3a
......@@ -3,7 +3,7 @@
.card-header
%h5
= hook_class.underscore.humanize.titleize.pluralize
(#{hooks.count})
(#{hooks.load.size})
- if hooks.any?
%ul.content-list
......
---
title: Reduce SQL queries when rendering webhook settings
merge_request: 27359
author:
type: performance
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment