From 0df1d159c6ab2091907dc7e1973b570115fb24c1 Mon Sep 17 00:00:00 2001 From: ferhat elmas Date: Tue, 28 Oct 2025 23:43:26 +0100 Subject: [PATCH] dev: prealloc intermediate slice in max same issues Prevents unnecessary memory allocations. Signed-off-by: ferhat elmas --- pkg/result/processors/max_same_issues.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/result/processors/max_same_issues.go b/pkg/result/processors/max_same_issues.go index ba22cf31fb62..34f73f4779ea 100644 --- a/pkg/result/processors/max_same_issues.go +++ b/pkg/result/processors/max_same_issues.go @@ -58,7 +58,7 @@ type kv struct { } func walkStringToIntMapSortedByValue(m map[string]int, walk func(k string, v int)) { - var ss []kv + ss := make([]kv, 0, len(m)) for k, v := range m { ss = append(ss, kv{ Key: k,