perf: pooled connection`s instantiation

- pooled connection: reduce the pressure on the GC to process heap memory objects with high concurrent "connection"
This commit is contained in:
Tianyi Zheng
2022-11-25 11:06:17 +08:00
committed by finley
parent f255fac7fb
commit a7a3da6e49
3 changed files with 24 additions and 3 deletions

View File

@@ -50,6 +50,8 @@ func (h *Handler) closeClient(client *connection.Connection) {
_ = client.Close()
h.db.AfterClientClose(client)
h.activeConn.Delete(client)
client.GetConnPool().Put(client)
}
// Handle receives and executes redis commands