Commit df9c8fad authored by Luke Champine's avatar Luke Champine Committed by GitHub

Merge pull request #1586 from NebulousLabs/perf

150% speedup when uploading large files
parents 95462e27 b7b7d998
......@@ -261,7 +261,7 @@ func shareFiles(files []*file, w io.Writer) error {
}
// Create compressor.
zip, _ := gzip.NewWriterLevel(w, gzip.BestCompression)
zip, _ := gzip.NewWriterLevel(w, gzip.BestSpeed)
enc := encoding.NewEncoder(zip)
// Encode each file.
......
......@@ -106,6 +106,9 @@ func StartContinuousProfile(profileDir string) {
// Sleep for an exponential amount of time each iteration, this
// keeps the size of the log small while still providing lots of
// information.
StopCPUProfile()
SaveMemProfile(profileDir, "continuousProfilingMem")
StartCPUProfile(profileDir, "continuousProfilingCPU")
time.Sleep(sleepTime)
sleepTime = time.Duration(1.5 * float64(sleepTime))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment