Closed weierophinney closed 3 years ago
It seems like we fixed requested changes, am i missing something?
Originally posted by @nightlinus at https://github.com/zendframework/zend-expressive-router/pull/78#issuecomment-442027674
Have this as some type of property test RouteCollectorTest::testCreatingHttpRouteWithExistingPathShouldBeLinear
it took 320ms vs 5s 940ms with new and old implementation on my machine.
Originally posted by @nightlinus at https://github.com/zendframework/zend-expressive-router/pull/78#issuecomment-442404580
I extract duplicate checks and storage logic to separate class, it looks better to me.
Originally posted by @nightlinus at https://github.com/zendframework/zend-expressive-router/pull/78#issuecomment-442564267
An idea would be to check for duplicates only in development mode ( $container->get('config')['debug'] ) ?
This pr optimizes route addition by removing O(n) duplicate check. In case of big monolitic application this starts to bite performance of application initialization. By the way i have added test for documented feature of detecting duplicate names, it was failing on develop branch.
Originally posted by @nightlinus at https://github.com/zendframework/zend-expressive-router/pull/78