mirror of
https://github.com/infinite-iroha/touka.git
synced 2026-06-13 15:47:38 +08:00
perf: modernize io paths and reduce proxy allocations
This commit is contained in:
parent
02861b5537
commit
54f7de0c60
11 changed files with 312 additions and 29 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue