perf: modernize io paths and reduce proxy allocations

This commit is contained in:
wjqserver 2026-04-11 01:43:34 +08:00
parent 02861b5537
commit 54f7de0c60
11 changed files with 312 additions and 29 deletions

View file

@ -235,7 +235,7 @@ func (r *recordingReader) Read(p []byte) (int, error) {
if n == 0 {
return 0, errors.New("reader received zero-length buffer")
}
for i := 0; i < n; i++ {
for i := range n {
p[i] = 'x'
}
r.left -= n