I don't mean 'faster' according to performance :) ... for sure it must
be improved. simple xdebug compare shows that this helper is slower
then Router::url ( sorry if this sample comare is completely lame ).
App::import('Helper','R');
$r = new rHelper();
$user = array('User'=>array('id'=>2));
$s = xdebug_time_index();
for($i=0;$i<100;$i++){
$r->adminViewUser($user);
}
echo '<br />';
echo xdebug_time_index() - $s;
echo '<br />';
$x = xdebug_time_index();
for($i=0;$i<100;$i++){
Router::url(array('controller'=>'users', 'action'=>'view', 'id'=>
$user['User']['id'], 'admin'=>true));
}
echo '<br />';
echo xdebug_time_index() - $x;
I mean faster as :
$r->adminViewUser($user);
VS
Router::url(array('controller'=>'users', 'action'=>'view', 'id'=>
$user['User']['id'], 'admin'=>true));
On 23 Paź, 19:54, Smelly_Eddie <[EMAIL PROTECTED]> wrote:
> Nookie:
>
> What are you using to compare performance?
>
> On Oct 22, 7:15 pm, Nookie <[EMAIL PROTECTED]> wrote:
>
> > I've just create new helper to create urls faster then just using
> > Router::url().
> > You can check it here ->http://bin.cakephp.org/view/490647179
> > I'll would like to know what you think about it and i'm waiting for
> > suggestions.
> > thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---