From 0f8c284787c9b6198363312b003308d437a4856c Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Fri, 5 Mar 2021 13:38:45 +0100 Subject: [PATCH] perf change --- 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