mirror of
https://github.com/weaveworks/scope.git
synced 2026-02-14 18:09:59 +00:00
Re-use gzip writers in a pool
Since they allocate sizeable chunks of memory, this can save on garbage-collection.
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"compress/gzip"
|
||||
"flag"
|
||||
"log"
|
||||
|
||||
@@ -20,7 +19,7 @@ func main() {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if err = rpt.WriteToFile(flag.Arg(1), gzip.DefaultCompression); err != nil {
|
||||
if err = rpt.WriteToFile(flag.Arg(1)); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user