Performance: Add preallocation for some slices (#59593)

This commit is contained in:
Denis Limarev
2023-01-11 23:03:37 +06:00
committed by GitHub
parent 8bda8b8272
commit 90badc8729
8 changed files with 11 additions and 11 deletions
@@ -144,6 +144,7 @@ func (gcn *GoogleChatNotifier) Notify(evalContext *alerting.EvalContext) error {
}
// add a text paragraph widget for the fields
//nolint:prealloc // break block
var fields []textParagraphWidget
fieldLimitCount := 4
for index, evt := range evalContext.EvalMatches {