php-router-benchmark icon indicating copy to clipboard operation
php-router-benchmark copied to clipboard

[WIP] Add Dash router to benchmarks

Open tyler-sommer opened this issue 11 years ago • 4 comments

Requested by @ocramius #1

tyler-sommer avatar Feb 26 '14 22:02 tyler-sommer

As for that service locator requirement: You can simply implement the route collection interface with a simple implementation for your benchmark.

DASPRiD avatar Feb 26 '14 23:02 DASPRiD

@DASPRiD Heh, apologies for missing that.

I implemented a custom RouteCollection and everything is working fantastic, but I'm curious about the results. I'm hoping you would take a look at how I'm setting things up -- perhaps I've made a mistake?

tyler-sommer avatar Feb 27 '14 00:02 tyler-sommer

Well, first off, you always only test the matching performance, and completely ignore the instantiation. This is kinda important, since usually for every match you also have the instantiation time (one match per request). This already makes it a little unfair, since Dash is quite performant in regard to that; see the following benchmark:

https://github.com/DASPRiD/RouterBenchmark

Apart from that, your benchmark makes absolutely no use of some of the key features of Dash, which involve heavy lazy loading and re-using of resources.

DASPRiD avatar Feb 27 '14 01:02 DASPRiD

Thanks, @DASPRiD. You're right, I am only testing matching performance. I do intend to extend the tests to cover instantiation and caching and whatever else-- just needed a place to start.

I will take a look at your benchmark to see some ways I can leverage Dash's features in these tests. Thanks again!

tyler-sommer avatar Feb 27 '14 02:02 tyler-sommer