You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
io.Reader make by bytes.NewBuffer() is inefficiency in io.Copy() (in my test the server's QPS is 3000), but io.Reader come from http req.body(it is a io.Reader object) is efficient in io.Copy() (the server's QPS is 8000). in my test the []byte convert to io.Reader object, then copy to a io.Writer object.when i test this io.Writer like this:
w.Write(payload[:])
the w is a io.Writer object, the efficiency is same with the io.Reader make by bytes.NewBuffer().
who can tell me how to deal this?
The text was updated successfully, but these errors were encountered:
mikioh
changed the title
io.Reader make by bytes.NewBuffer() is inefficiency in io.Copy()
bytes: io.Reader made by bytes.NewBuffer() is inefficiency in io.Copy()
Feb 27, 2015
io.Reader make by bytes.NewBuffer() is inefficiency in io.Copy() (in my test the server's QPS is 3000), but io.Reader come from http req.body(it is a io.Reader object) is efficient in io.Copy() (the server's QPS is 8000). in my test the []byte convert to io.Reader object, then copy to a io.Writer object.when i test this io.Writer like this:
w.Write(payload[:])
the w is a io.Writer object, the efficiency is same with the io.Reader make by bytes.NewBuffer().
who can tell me how to deal this?
The text was updated successfully, but these errors were encountered: