perf: reuse reverse proxy candidate slices

This commit is contained in:
wjqserver 2026-04-10 06:18:52 +08:00
parent 71a344a3de
commit 017bb13295
3 changed files with 86 additions and 8 deletions

View file

@ -91,6 +91,13 @@ var reverseProxyCopyBufferPool = sync.Pool{
},
}
var reverseProxyCandidatePool = sync.Pool{
New: func() any {
s := make([]*reverseProxyUpstream, 0, 8)
return &s
},
}
type reverseProxyStatusError struct {
status int
err error