Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

writeBodyFixedSize: Only do an early flush if the reader is an *os.File #1674

Merged
merged 1 commit into from
Dec 2, 2023

Commits on Dec 1, 2023

  1. writeBodyFixedSize: Only do an early flush if the reader is an *os.File

    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.
    Jille committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    ee9576b View commit details
    Browse the repository at this point in the history