perf: use io copy with buffer pool (#6389)

* feat: add io methods with buffer

* chore: move io.Copy calls to utils.CopyWithBuffer
This commit is contained in:
Mmx
2024-04-25 20:11:15 +08:00
committed by GitHub
parent ec08ecdf6c
commit b95df1d745
22 changed files with 59 additions and 27 deletions

View File

@ -229,7 +229,7 @@ func (d *ChaoXing) Put(ctx context.Context, dstDir model.Obj, stream model.FileS
if err != nil {
return err
}
_, err = io.Copy(filePart, stream)
_, err = utils.CopyWithBuffer(filePart, stream)
if err != nil {
return err
}