It takes too much time when using “template” package to generate a dynamic web page to client in Golang
问题 It is so slow when using template package to generate a dynamic web page to client. Testing code as below, golang 1.4.1 http.Handle("/js/", (http.FileServer(http.Dir(webpath)))) http.Handle("/css/", (http.FileServer(http.Dir(webpath)))) http.Handle("/img/", (http.FileServer(http.Dir(webpath)))) http.HandleFunc("/test", TestHandler) func TestHandler(w http.ResponseWriter, r *http.Request) { Log.Info("Entering TestHandler ...") r.ParseForm() filename := NiConfig.webpath + "/test.html" t, err :=