shithub: hugo

Download patch

ref: 4c3c5120389cc95edc63b8f18a0eee786aa0c5e2
parent: 0775c98e6c5b700e46adaaf190fc3f693a6ab002
author: Bjørn Erik Pedersen <[email protected]>
date: Tue Apr 23 13:14:02 EDT 2019

commands: Init mem profile at the end

Much more useful ...

--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -431,8 +431,6 @@
 		return nil, err
 	}
 
-	defer c.initMemProfile()
-
 	stopMutexProf, err := c.initMutexProfile()
 	if err != nil {
 		return nil, err
@@ -444,6 +442,8 @@
 	}
 
 	return func() {
+		c.initMemProfile()
+
 		if stopCPUProf != nil {
 			stopCPUProf()
 		}