1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-27 16:28:27 +02:00

increased filesystem read buffer to speedup writes

This commit is contained in:
Gani Georgiev
2025-07-19 09:34:01 +03:00
parent 5ca79eb85d
commit fadb2e68a2

View File

@@ -173,7 +173,7 @@ func (r *Reader) WriteTo(w io.Writer) (int64, error) {
func readFromWriteTo(r io.Reader, w io.Writer) (int64, int64, error) {
// Note: can't use io.Copy because it will try to use r.WriteTo
// or w.WriteTo, which is recursive in this context.
buf := make([]byte, 1024)
buf := make([]byte, 4096)
var totalRead, totalWritten int64
for {
numRead, rerr := r.Read(buf)