Closed bakura10 closed 10 years ago
I'll try that out after finishing the unit tests. The idea sounds indeed interesting.
(In fact I played a loooot with sorting for the event manager rewrite... using a custom method for sorting was so slower I cannot tell you how much: around 0,45 s without custom method, and execution timeout using custom function, so it's at the minimum 60 times slower).
Here: https://github.com/DASPRiD/Dash/blob/master/src/Dash/Mvc/Router/Http/RouteCollection/RouteCollection.php#L113
You are using uasort but it's pretty slow. I think you can reorder those lines: https://github.com/DASPRiD/Dash/blob/master/src/Dash/Mvc/Router/Http/RouteCollection/RouteCollection.php#L66
so that priority comes first, then serial, then route. This way you can directly use sort without having to rely on a custom method.