Issues

ZF-3224: Zend_Controller_Router_Route code cleaning (for readability) and optimization

Description

Clean the code and optimize standard framework route.

Testing 10000 matches of:


$route = new Zend_Controller_Router_Route('archives/:year/:month/*', array('controller' => 'archive'));

for ($i = 1; $i <= 10000; $i++) {
    $values = $route->match('archives/2006/' . $i . '/controller/test/year/' . $i . '/sort/author');
}

Before refactoring: Test took: 0.6967 Test took: 0.6868 Test took: 0.7009 Test took: 0.6913 Test took: 0.6931 = 3,4688 s

After first: Test took: 0.5861 Test took: 0.5835 Test took: 0.5802 Test took: 0.5799 Test took: 0.5826 = 2.9123 s

Approx 20% gain.

Comments

Scheduling for next minor release; Martel, let me know if this will be backwards incompatible, so I can re-schedule and provide a branch for your development.

I believe these changes were incorporated in 1.6.0

Changing issues in preparation for the 1.7.0 release.