[go-nuts] Bufio vs. Writing to Disk

2017-01-18 Thread Tamás Gulácsi
The bufio.NewWriter is unneeded here, as both the gzip.Writer and csv.Writer are buffered. The concept of csv.Writer(gzip.Writer(os.File)) is ok. Compression is cpu bound, and csv.Writer may need some optimization. But first measure, use testing package's benchmark functionality. -- You recei

[go-nuts] Bufio vs. Writing to Disk

2017-01-18 Thread Frank Davidson
Hi, I have some code to write out a .csv file and then gzip it. I am using a bufio.NewWriter to link the two: x := gzip.NewWriter(outputFile) outBuf := bufio.NewWriter(x) w := csv.NewWriter(outBuf) It seems slow. Would I be better off just writing first a .csv file to disk and then gzi