diff --git a/index/store/leveldb/batch.go b/index/store/leveldb/batch.go index abce518f..ad815226 100644 --- a/index/store/leveldb/batch.go +++ b/index/store/leveldb/batch.go @@ -31,7 +31,7 @@ type Batch struct { func newBatch(store *Store) *Batch { rv := Batch{ store: store, - ops: make([]op, 0), + ops: make([]op, 0, 100), merges: make(map[string]indexStore.AssociativeMergeChain), } return &rv @@ -40,7 +40,7 @@ func newBatch(store *Store) *Batch { func newBatchAlreadyLocked(store *Store) *Batch { rv := Batch{ store: store, - ops: make([]op, 0), + ops: make([]op, 0, 100), alreadyLocked: true, merges: make(map[string]indexStore.AssociativeMergeChain), }