perf: store/cachekv: preallocate kvL in dirtyItems which gets appended too (#14168)
This commit is contained in:
parent
c8d7b74259
commit
0115f88ebc
@ -339,7 +339,7 @@ func (store *Store) dirtyItems(start, end []byte) {
|
||||
}
|
||||
}
|
||||
|
||||
kvL := make([]*kv.Pair, 0)
|
||||
kvL := make([]*kv.Pair, 0, 1+endIndex-startIndex)
|
||||
for i := startIndex; i <= endIndex; i++ {
|
||||
key := strL[i]
|
||||
cacheValue := store.cache[key]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user