shadowsocks / go-shadowsocks2

Modern Shadowsocks in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

one trick to improve performance perhaps

leewi9 opened this issue · comments

use io.CopyBuffer instead of io.Copy in the tcp.go

set the buffer size larger or find the optimal buffer size

commented

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?

commented

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.