1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/pkg/ioutils
Brian Goff 9a25b1d942 Improve performance/reduce allocs of bytespipe
Creates a `fixedBuffer` type that is used to encapsulate functionality
for reading/writing from the underlying byte slices.

Uses lazily-loaded set of sync.Pools for storing buffers that are no
longer needed so they can be re-used.

```
benchmark                     old ns/op     new ns/op     delta
BenchmarkBytesPipeWrite-8     138469        48985         -64.62%
BenchmarkBytesPipeRead-8      130922        56601         -56.77%

benchmark                     old allocs     new allocs     delta
BenchmarkBytesPipeWrite-8     18             8              -55.56%
BenchmarkBytesPipeRead-8      0              0              +0.00%

benchmark                     old bytes     new bytes     delta
BenchmarkBytesPipeWrite-8     66903         1649          -97.54%
BenchmarkBytesPipeRead-8      0             1             +Inf%
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-04-05 13:06:04 -04:00
..
buffer.go Improve performance/reduce allocs of bytespipe 2016-04-05 13:06:04 -04:00
buffer_test.go Improve performance/reduce allocs of bytespipe 2016-04-05 13:06:04 -04:00
bytespipe.go Improve performance/reduce allocs of bytespipe 2016-04-05 13:06:04 -04:00
bytespipe_test.go Improve performance/reduce allocs of bytespipe 2016-04-05 13:06:04 -04:00
fmt.go Format output of docker info 2015-09-23 14:35:13 +08:00
fmt_test.go
multireader.go Enable golint part of #14756 2015-08-03 09:45:05 +08:00
multireader_test.go Split reader interface from logger interface 2015-07-21 20:47:31 -04:00
readers.go Improved push and pull with upload manager and download manager 2015-12-09 19:13:35 -08:00
readers_test.go Improved push and pull with upload manager and download manager 2015-12-09 19:13:35 -08:00
temp_unix.go Abstract builder and implement server-side dockerfile builder 2015-10-06 19:10:19 -04:00
temp_windows.go Abstract builder and implement server-side dockerfile builder 2015-10-06 19:10:19 -04:00
writeflusher.go Cleanup WriteFlusher 2016-02-09 14:02:26 -05:00
writers.go Fix typos found across repository 2015-12-13 18:04:12 +02:00
writers_test.go