improve performace, add pprof and add logs