Closed leewi9 closed 4 years ago
You should not make random suggestions like this without understanding the code base or running real benchmarks. It's a waste of both your and my time.
I said perhaps
Who do you think you are?
Excuse me? I wrote the majority of the code base.
Your suggestion demonstrates your lack of understanding about how io.Copy
works underneath, and apparently you did not study this code base to learn how it optimizes memory allocation.
use
io.CopyBuffer
instead ofio.Copy
in thetcp.go
set the buffer size larger or find the optimal buffer size