diff --git a/store/cachekv/memiterator.go b/store/cachekv/memiterator.go index c5a00ab8dfc..675494b8ffe 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