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
{{ message }}
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.
On 22 Jan 2019, at 11:03 AM, IrineBrunner ***@***.***> wrote:
https://github.com/shadowsocks/shadowsocks-go/blob/49161ddf51fc65cf557554b8909aeb82e9da5409/shadowsocks/conn.go#L109
103.60MB 103.60MB (flat, cum) 88.15% of Total . . 104: } . . 105: } . . 106: . . 107: cipherData := c.readBuf . . 108: if len(b) > len(cipherData) { 103.60MB 103.60MB 109: cipherData = make([]byte, len(b)) . . 110: } else { . . 111: cipherData = cipherData[:len(b)] . . 112: } . . 113: . . 114: n, err = c.Conn.Read(cipherData) (pprof)
avoid create new slice for each Read().
cipherData := c.readBuf if len(b) < len(cipherData) { cipherData = cipherData[:len(b)] }
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
shadowsocks-go/shadowsocks/conn.go
Line 109 in 49161dd
avoid create new slice for each Read().
The text was updated successfully, but these errors were encountered: