-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
Milestone
Description
What steps reproduce the problem? I've been doing some tests here with a net/http server where the handler makes many relatively small writes of binary data to the ResponseWriter. I am ranging over some key-values with a LevelDB iterator, and writing a bunch of the values. The underlying bufio.Writer's size is hard-coded at 4k: http://golang.org/src/pkg/net/http/server.go#L433 With this size, my throughput is about 65 MB/sec. Increasing to 64k gets me to 90MB/sec and a 1M buffer gets me to 140 MB/sec. The throughput of writing net/http responses can be significantly improved by making the write buffer configurable. Discussion here: https://groups.google.com/d/msg/golang-dev/OuFtcKEyGrg/VyKo_LqOhK8J Please provide any additional information below. The fix is two lines. Given that there's still 173 Go 1.3 bugs open, I would implore you to let me send a CL now rather than wait another 6 months. But anyway.