I am using golang to load data from CassandraDB and send it to the view component, but it takes almost 2min to load 20k rows of data which is not good for the end-user.
how to handle this amount of data faster?
This is just an example :
server.go
...
var tpl = template.Must(template.ParseFiles("index.html"))
func indexHandler(w http.ResponseWriter, r *http.Request) {
day:=[]string{"Mon","tue","wed","friday"} // huge data from cassandraDB
tpl.Execute(w, day)
}
...
index.html
{{range .}}
<a>{{.}}</a> <!--Dispay 20k of data-->
{{ end}}