Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
writeBodyFixedSize: Only do an early flush if the reader is an *os.Fi…
…le (#1674) or an *io.LimitedReader of an *os.File (because that's also supported by https://cs.opensource.google/go/go/+/refs/tags/go1.21.4:src/bufio/bufio.go;l=784) I think that having to flush less often outweighs the overhead of the extra check. The appended data is known to be large, but it might still save us a syscall by allowing it to buffer more.
- Loading branch information