mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 18:37:05 +00:00
don't create a new controller instance if it doesn't have struct dependencies and the fields length is 0 - 0.4MB/s difference from the raw handlers now.
Former-commit-id: f808291fe84bc2cdd83f60f62f8b3140204110a5
This commit is contained in:
16
mvc/param.go
16
mvc/param.go
@@ -27,25 +27,11 @@ func getPathParamsForInput(params []macro.TemplateParam, funcIn ...reflect.Type)
|
||||
// fmt.Printf("%s input arg type vs %s param type\n", in.Kind().String(), p.Type.Kind().String())
|
||||
if paramType.Assignable(in.Kind()) {
|
||||
consumedParams[j] = true
|
||||
// fmt.Printf("path_param_binder.go: bind path param func for paramName = '%s' and paramType = '%s'\n", paramName, paramType.String())
|
||||
// fmt.Printf("param.go: bind path param func for paramName = '%s' and paramType = '%s'\n", paramName, paramType.String())
|
||||
values = append(values, makeFuncParamGetter(paramType, paramName))
|
||||
}
|
||||
}
|
||||
}
|
||||
// funcInIdx := 0
|
||||
// // it's a valid param type.
|
||||
// for _, p := range params {
|
||||
// in := funcIn[funcInIdx]
|
||||
// paramType := p.Type
|
||||
// paramName := p.Name
|
||||
// // fmt.Printf("%s input arg type vs %s param type\n", in.Kind().String(), p.Type.Kind().String())
|
||||
// if paramType.Assignable(in.Kind()) {
|
||||
// // fmt.Printf("path_param_binder.go: bind path param func for paramName = '%s' and paramType = '%s'\n", paramName, paramType.String())
|
||||
// values = append(values, makeFuncParamGetter(paramType, paramName))
|
||||
// }
|
||||
|
||||
// funcInIdx++
|
||||
// }
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user