jjzjj

json - 使用 Echo 或 Gin 框架的大型数组的内存消耗

当我尝试用Echo(还有Gin)发送一个大数组时,我遇到了内存问题。请求后,内存不空闲。packagemainimport("net/http""strconv""github.com/labstack/echo")typeUserstruct{UsernamestringPasswordstringLastnamestringFirstnamestring}funcmain(){e:=echo.New()e.GET("/",func(cecho.Context)error{varuserUserusers:=make([]User,0)fori:=0;i为了测试,我并行运行请求并得到