Skip to content

Commit

Permalink
Use a larger write buffer
Browse files Browse the repository at this point in the history
The mysql driver library uses 16kb by default, so let's match that
  • Loading branch information
Jille committed Oct 3, 2024
1 parent 8ce6b32 commit 2b86f82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mysqltsv.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type Encoder struct {
// EncoderOptions is optional.
func NewEncoder(w io.Writer, numColumns int, cfg *EncoderOptions) *Encoder {
return &Encoder{
w: bufio.NewWriter(w),
w: bufio.NewWriterSize(w, 16*1024),
numColumnsPerRow: numColumns,
colsLeftInRow: numColumns,
encoderOptions: cfg,
Expand Down

0 comments on commit 2b86f82

Please sign in to comment.