lib/streamaggr: return back string interning to dedupAggr after 78953723200f15ffc417064d1912bdbb7551505c

It should reduce memory allocation rate during stream deduplication
This commit is contained in:
Aliaksandr Valialkin 2024-06-10 18:04:16 +02:00
parent 6a0a36aa93
commit bf2d299420
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB

View file

@ -1,7 +1,6 @@
package streamaggr
import (
"strings"
"sync"
"sync/atomic"
"unsafe"
@ -173,7 +172,7 @@ func (das *dedupAggrShard) pushSamples(samples []pushSample) {
s.value = sample.value
s.timestamp = sample.timestamp
key := strings.Clone(sample.key)
key := bytesutil.InternString(sample.key)
m[key] = s
das.itemsCount.Add(1)