iris icon indicating copy to clipboard operation
iris copied to clipboard

[FEATURE REQUEST]If there are more registered routes, it will be slower。

Open fdsnsf opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

code:https://github.com/kataras/iris/blob/master/core/router/api_builder.go#L89

Why do you not use map when you register a route to check whether the route exists?If there are more registered routes, it will be slower。

fdsnsf avatar Feb 26 '21 03:02 fdsnsf

Hello @fdsnsf the build-time is slower, not the serve-time, please note that in your title. We use slice instead of map because of Route.DeepEqual but this may change in the future depending on our needs.

kataras avatar Apr 04 '21 14:04 kataras