mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00: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 changed files with 1 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue