mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 10:27:06 +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:
@@ -5,7 +5,7 @@ package main
|
||||
// with bindings or without).
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/_benchmarks/iris-mvc2/controllers"
|
||||
"github.com/kataras/iris/_benchmarks/iris-mvc/controllers"
|
||||
|
||||
"github.com/kataras/iris"
|
||||
"github.com/kataras/iris/mvc"
|
||||
@@ -16,3 +16,5 @@ func main() {
|
||||
mvc.New(app.Party("/api/values/{id}")).Register(new(controllers.ValuesController))
|
||||
app.Run(iris.Addr(":5000"), iris.WithoutVersionChecker)
|
||||
}
|
||||
|
||||
// +2MB/s faster than the previous implementation, 0.4MB/s difference from the raw handlers.
|
||||
|
||||
Reference in New Issue
Block a user