alertmanager
alertmanager copied to clipboard
Remove duplicate slice during Silences query
If there are a lot of silences Silences.query, for queries without
q.ids, first copies all their pointers to a slice, causing a lot of
allocations, and then does it again to a new shorter slice filtered by
the query. We avoid this by only adding to the result slice in case of a
match. This creates savings for each queries, scaling with the number of silences.