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

Issue Type: Improvement Created: 2008-05-08T11:24:55.000+0000 Last Updated: 2008-11-13T14:10:11.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)

Reporter: Michal Minicki (martel) Assignee: Michal Minicki (martel) Tags: - Zend_Controller

Related issues: Attachments:


Clean the code and optimize standard framework route.

Testing 10000 matches of:

<pre class="highlight">
$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.


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.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.