mirror of https://github.com/grpc/grpc-go.git
Use a bufio.Reader for input.
This reduces the number of system calls for reading network data, providing a nice speedup when there are concurrent RPCs.
This commit is contained in:
parent
b1439a2743
commit
a1d076a617
|
|
@ -272,7 +272,7 @@ type framer struct {
|
|||
|
||||
func newFramer(conn net.Conn) *framer {
|
||||
f := &framer{
|
||||
reader: conn,
|
||||
reader: bufio.NewReaderSize(conn, http2IOBufSize),
|
||||
writer: bufio.NewWriterSize(conn, http2IOBufSize),
|
||||
}
|
||||
f.fr = http2.NewFramer(f.writer, f.reader)
|
||||
|
|
|
|||
Loading…
Reference in New Issue