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
Posted by Matthew Weier O'Phinney (matthew) on 2008-05-09T11:18:51.000+0000
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.
Posted by Matthew Weier O'Phinney (matthew) on 2008-11-05T11:08:53.000+0000
I believe these changes were incorporated in 1.6.0
Posted by Wil Sinclair (wil) on 2008-11-13T14:10:11.000+0000
Changing issues in preparation for the 1.7.0 release.