From 102be499bd68ebd3a995032b2e74f38a5488e88d Mon Sep 17 00:00:00 2001 From: Marko Date: Fri, 5 Mar 2021 13:17:31 +0000 Subject: [PATCH] perf change (#8796) Co-authored-by: Alessio Treglia Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit e17953ab112244fece1534b386517bf9cd44ce05) --- store/cachekv/memiterator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/cachekv/memiterator.go b/store/cachekv/memiterator.go index c5a00ab8dfcd..675494b8ffe2 100644 --- a/store/cachekv/memiterator.go +++ b/store/cachekv/memiterator.go @@ -19,7 +19,7 @@ type memIterator struct { } func newMemIterator(start, end []byte, items *list.List, ascending bool) *memIterator { - itemsInDomain := make([]*kv.Pair, 0) + itemsInDomain := make([]*kv.Pair, 0, items.Len()) var entered bool