minio/docs
Harshavardhana 76e2713ffe
fix: use buffers only when necessary for io.Copy() (#11229)
Use separate sync.Pool for writes/reads

Avoid passing buffers for io.CopyBuffer()
if the writer or reader implement io.WriteTo or io.ReadFrom
respectively then its useless for sync.Pool to allocate
buffers on its own since that will be completely ignored
by the io.CopyBuffer Go implementation.

Improve this wherever we see this to be optimal.

This allows us to be more efficient on memory usage.
```
   385  // copyBuffer is the actual implementation of Copy and CopyBuffer.
   386  // if buf is nil, one is allocated.
   387  func copyBuffer(dst Writer, src Reader, buf []byte) (written int64, err error) {
   388  	// If the reader has a WriteTo method, use it to do the copy.
   389  	// Avoids an allocation and a copy.
   390  	if wt, ok := src.(WriterTo); ok {
   391  		return wt.WriteTo(dst)
   392  	}
   393  	// Similarly, if the writer has a ReadFrom method, use it to do the copy.
   394  	if rt, ok := dst.(ReaderFrom); ok {
   395  		return rt.ReadFrom(src)
   396  	}
```

From readahead package
```
// WriteTo writes data to w until there's no more data to write or when an error occurs.
// The return value n is the number of bytes written.
// Any error encountered during the write is also returned.
func (a *reader) WriteTo(w io.Writer) (n int64, err error) {
	if a.err != nil {
		return 0, a.err
	}
	n = 0
	for {
		err = a.fill()
		if err != nil {
			return n, err
		}
		n2, err := w.Write(a.cur.buffer())
		a.cur.inc(n2)
		n += int64(n2)
		if err != nil {
			return n, err
		}
```
2021-01-06 09:36:55 -08:00
..
bigdata Update hadoop docs to indicate new committers (#8060) 2019-09-30 21:34:06 -07:00
bucket Allow Compression + encryption (#11103) 2021-01-05 20:08:35 -08:00
chroot fix: docs remove goreportcard, its deprecated 2020-03-24 14:51:06 -07:00
compression Allow Compression + encryption (#11103) 2021-01-05 20:08:35 -08:00
config feat: migrate to ROOT_USER/PASSWORD from ACCESS/SECRET_KEY (#11185) 2021-01-05 10:22:57 -08:00
debugging Rename OBD to Health (#10842) 2020-11-20 12:52:53 -08:00
deployment/kernel-tuning fix sysctl.sh quotes which are incompatible with sysctl (#10446) 2020-09-09 17:29:23 -07:00
disk-caching feat: migrate to ROOT_USER/PASSWORD from ACCESS/SECRET_KEY (#11185) 2021-01-05 10:22:57 -08:00
distributed fix: rename remaining zone -> pool (#11231) 2021-01-06 09:35:47 -08:00
docker feat: migrate to ROOT_USER/PASSWORD from ACCESS/SECRET_KEY (#11185) 2021-01-05 10:22:57 -08:00
erasure add reference to distributed doc for clarity (#9783) 2020-06-08 12:30:42 -07:00
federation/lookup Replace proxy with forward in coredns example (#8344) 2019-10-01 22:23:08 +05:30
gateway feat: migrate to ROOT_USER/PASSWORD from ACCESS/SECRET_KEY (#11185) 2021-01-05 10:22:57 -08:00
integrations/veeam docs: fix veeam document formatting 2020-07-18 18:38:12 -07:00
kms feat: migrate to ROOT_USER/PASSWORD from ACCESS/SECRET_KEY (#11185) 2021-01-05 10:22:57 -08:00
logging humanize timeToFirstByte and timeToResponse upto nanoseconds (#9641) 2020-05-19 18:34:02 -07:00
metrics docs: fix the metrics formatting (#11081) 2020-12-10 18:15:47 -08:00
multi-tenancy feat: migrate to ROOT_USER/PASSWORD from ACCESS/SECRET_KEY (#11185) 2021-01-05 10:22:57 -08:00
multi-user docs: Add policy variables for resource and conditions (#10278) 2020-08-17 17:39:55 -07:00
orchestration feat: migrate to ROOT_USER/PASSWORD from ACCESS/SECRET_KEY (#11185) 2021-01-05 10:22:57 -08:00
screenshots fix: distributed docs image path 2020-05-11 09:33:55 -07:00
security cleanup security overview guide 2020-07-11 00:34:56 -07:00
select feat: disable Parquet by default (breaking change) (#9920) 2020-08-18 10:23:28 -07:00
shared-backend fix: use buffers only when necessary for io.Copy() (#11229) 2021-01-06 09:36:55 -08:00
sts feat: migrate to ROOT_USER/PASSWORD from ACCESS/SECRET_KEY (#11185) 2021-01-05 10:22:57 -08:00
throttle feat: migrate to ROOT_USER/PASSWORD from ACCESS/SECRET_KEY (#11185) 2021-01-05 10:22:57 -08:00
tls deprecate CommonName from TLS docs (#11017) 2020-12-02 10:18:39 -08:00
zh_CN fix: use buffers only when necessary for io.Copy() (#11229) 2021-01-06 09:36:55 -08:00
minio-limits.md Fix caddy project url (#11198) 2020-12-31 09:44:07 -08:00