mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 15:29:24 +01:00
lib/streamaggr: return back string interning to dedupAggr after 78953723200f15ffc417064d1912bdbb7551505c
It should reduce memory allocation rate during stream deduplication
This commit is contained in:
parent
6a0a36aa93
commit
bf2d299420
@ -1,7 +1,6 @@
|
|||||||
package streamaggr
|
package streamaggr
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
@ -173,7 +172,7 @@ func (das *dedupAggrShard) pushSamples(samples []pushSample) {
|
|||||||
s.value = sample.value
|
s.value = sample.value
|
||||||
s.timestamp = sample.timestamp
|
s.timestamp = sample.timestamp
|
||||||
|
|
||||||
key := strings.Clone(sample.key)
|
key := bytesutil.InternString(sample.key)
|
||||||
m[key] = s
|
m[key] = s
|
||||||
|
|
||||||
das.itemsCount.Add(1)
|
das.itemsCount.Add(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user