Descriptionarchive/zip: re-use flate.Writers when writing compressed files
Prevents a ton of garbage. (Noticed this when writing large
Camlistore zip archives to Amazon Glacier)
Note that the Closer part of the io.WriteCloser is never given
to users. It's an internal detail of the package.
benchmark old ns/op new ns/op delta
BenchmarkCompressedZipGarbage 42884123 40732373 -5.02%
benchmark old allocs new allocs delta
BenchmarkCompressedZipGarbage 204 149 -26.96%
benchmark old bytes new bytes delta
BenchmarkCompressedZipGarbage 4397576 66744 -98.48%
Patch Set 1 #Patch Set 2 : diff -r 8109f20c33fd https://go.googlecode.com/hg/ #Patch Set 3 : diff -r 8109f20c33fd https://go.googlecode.com/hg/ #
Total comments: 3
Patch Set 4 : diff -r c3ee11c5f19f https://go.googlecode.com/hg/ #MessagesTotal messages: 6
|