Open evkuzin opened 1 week ago
@w0rm WDYT?
Seems reasonable to me. What does the profile look like with the change?
@grobinson-grafana thx for taking a look! attaching a picture from pyroscope. On the left is a binary with a patch and on the right second node from the same cluster
I suppose we can go further and replace this comparison https://github.com/prometheus/alertmanager/pull/4119/files#diff-279dfe3df5d26e996ad18fe4a97c9dea0c7c4d5079c11c96d4a4644e942602dfL240 with something better. We already using FNV-1A fingerprint and comparing uint64 instead of strings would dramatically improve this other bit where we waste tonn of time (runtime.mapaccess1_faststr ). But for now I just want this quick win.
Regarding the failed test. it seems like this is not enough for alertmannger to start on CI? Do I need to fix it?
I would benchmark the difference between mapaccess1_faststr
and mapaccess1_fast64
to be sure there is a considerable speed up, as from what I can tell fast64
also calculates hashes on the int64. It might be that fnv1
+ fast64
is slower than faststr
.
fair enough. Anyway, I didnt plan to include this in the current PR. Does this look like it can be accepted by any chance?
@SuperQ can it be merged? Whats the process?
I would like one of the Alertmanager maintainers to look at this before merging.
with big number of inhibitions I see pretty bad picture when we spend plenty of time in time.Now() This can be fixed by calling it once per
hasEqual