mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
fix(backend): don't over-allocate groups in dedup code
This commit is contained in:
committed by
Łukasz Mierzwa
parent
b1fb3ab1b8
commit
63fb49d8a9
@@ -20,7 +20,7 @@ func DedupAlerts() []models.AlertGroup {
|
||||
groups := am.Alerts()
|
||||
for _, ag := range groups {
|
||||
if _, found := uniqueGroups[ag.ID]; !found {
|
||||
uniqueGroups[ag.ID] = make([]models.AlertGroup, 0, len(groups))
|
||||
uniqueGroups[ag.ID] = []models.AlertGroup{}
|
||||
}
|
||||
uniqueGroups[ag.ID] = append(uniqueGroups[ag.ID], ag)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user