alexandrevicenzi / yagm

Yet Another Go Mux
MIT License
3 stars 2 forks source link

Issue #1 - A more optimised route list #4

Closed lummie closed 7 years ago

lummie commented 7 years ago

As you were iterating the map of routes, I have converted this to an array and track the requests to each route. This is used to occasionally sort the array so the most common routes come first. How often can be controlled by RouteOptimizeRequestCount. Added a test.