make leveldb faster with non-zero sized batch
This commit is contained in:
parent
1c1774d4ad
commit
c5c59e61f4
@ -31,7 +31,7 @@ type Batch struct {
|
|||||||
func newBatch(store *Store) *Batch {
|
func newBatch(store *Store) *Batch {
|
||||||
rv := Batch{
|
rv := Batch{
|
||||||
store: store,
|
store: store,
|
||||||
ops: make([]op, 0),
|
ops: make([]op, 0, 100),
|
||||||
merges: make(map[string]indexStore.AssociativeMergeChain),
|
merges: make(map[string]indexStore.AssociativeMergeChain),
|
||||||
}
|
}
|
||||||
return &rv
|
return &rv
|
||||||
@ -40,7 +40,7 @@ func newBatch(store *Store) *Batch {
|
|||||||
func newBatchAlreadyLocked(store *Store) *Batch {
|
func newBatchAlreadyLocked(store *Store) *Batch {
|
||||||
rv := Batch{
|
rv := Batch{
|
||||||
store: store,
|
store: store,
|
||||||
ops: make([]op, 0),
|
ops: make([]op, 0, 100),
|
||||||
alreadyLocked: true,
|
alreadyLocked: true,
|
||||||
merges: make(map[string]indexStore.AssociativeMergeChain),
|
merges: make(map[string]indexStore.AssociativeMergeChain),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user