mirror of
https://github.com/duanhf2012/origin.git
synced 2026-03-02 03:04:49 +08:00
优化gateway-减少GC
This commit is contained in:
@@ -37,8 +37,7 @@ func newTCPConn(conn net.Conn, pendingWriteNum int, msgParser *MsgParser) *TCPCo
|
||||
break
|
||||
}
|
||||
_, err := conn.Write(b)
|
||||
releaseByteSlice(b)
|
||||
|
||||
ReleaseByteSlice(b)
|
||||
|
||||
if err != nil {
|
||||
break
|
||||
@@ -126,7 +125,7 @@ func (tcpConn *TCPConn) ReadMsg() ([]byte, error) {
|
||||
}
|
||||
|
||||
func (tcpConn *TCPConn) ReleaseReadMsg(byteBuff []byte){
|
||||
releaseByteSlice(byteBuff)
|
||||
ReleaseByteSlice(byteBuff)
|
||||
}
|
||||
|
||||
func (tcpConn *TCPConn) WriteMsg(args ...[]byte) error {
|
||||
|
||||
Reference in New Issue
Block a user