Performance problem with object assigned to template
| From: | Todd | Date: | Wed, 21 Sep 2005 20:48:30 +0000 |
| Subject: | Performance problem with object assigned to template | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-13051@lists.php.net to get a copy of this message | ||
Hi All,
First let me say that I have been tinkering with Smarty a little bit over the
last few weeks and I really like it. It's pretty slick.
Pages were rendering very fast until I started using calling a method on an
object that I assigned to my template by reference. I am pretty sure that is
the only change I made before the slow down. Also, I have unit tests for the
code behind that method and it runs fast.
In my PHP code: $smarty->assign_by_ref('obj_name', $obj);
In my template: {$obj_name->someMethod()}
Now pages are rendering very slow (about 3 to 4 seconds!). Is this a known
issue? What tips can you provide to help be track down the bottleneck.
Thanks,
Todd