increase writer buffers

master
Oliver Tonnhofer 2013-05-28 16:52:52 +02:00
parent 030c2f0fbf
commit c7e2959b69
1 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ import (
"sync"
)
const bufferSize = 1024
const bufferSize = 1024 * 8
type InsertBatch struct {
Table string
@ -24,8 +24,8 @@ type InsertBuffer struct {
func NewInsertBuffer() *InsertBuffer {
ib := InsertBuffer{
In: make(chan InsertElement),
Out: make(chan InsertBatch),
In: make(chan InsertElement, 256),
Out: make(chan InsertBatch, 8),
wg: &sync.WaitGroup{},
}
ib.wg.Add(1)