0
0

make leveldb faster with non-zero sized batch

This commit is contained in:
Steve Yen 2015-01-29 10:20:26 -08:00
parent 1c1774d4ad
commit c5c59e61f4

View File

@ -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),
}