mirror of
https://github.com/minio/minio.git
synced 2025-11-23 19:17:43 -05:00
fix: inherit heal opts globally, including bitrot settings (#11166)
Bonus re-use ReadFileStream internal io.Copy buffers, fixes lots of chatty allocations when reading metacache readers with many sustained concurrent listing operations ``` 17.30GB 1.27% 84.80% 35.26GB 2.58% io.copyBuffer ```
This commit is contained in:
@@ -522,7 +522,10 @@ func (s *storageRESTServer) ReadFileStreamHandler(w http.ResponseWriter, r *http
|
||||
|
||||
w.Header().Set(xhttp.ContentLength, strconv.Itoa(length))
|
||||
|
||||
io.Copy(w, rc)
|
||||
bufp := s.storage.pool.Get().(*[]byte)
|
||||
defer s.storage.pool.Put(bufp)
|
||||
|
||||
io.CopyBuffer(w, rc, *bufp)
|
||||
w.(http.Flusher).Flush()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user