Zend Partial + Zend Action Helper causes an additional request to bootstrap?

Posted by AndreLiem on Stack Overflow See other posts from Stack Overflow or by AndreLiem
Published on 2010-12-24T00:47:32Z Indexed on 2010/12/24 0:54 UTC
Read the original article Hit count: 279

Filed under:
|
|
|
|

I've been profiling some zend framework code with webgrind to see where some bottle necks are and I'm noticing some very odd behavior.

Using the zend partial for example, if I pass a variable value that comes from a zend action helper, it results in two requests being made.

in sample.phtml

echo $this->partial('partial/embed.phtml', array('url' => $this->url));

in indexcontroller.php

$this->view->url = $this->_helper->Embed()->url;

But if I don't pass the value from the helper to the partial, but still run the helper, it only makes one request in webgrind.

e.g.

$this->view->url = 'test';
$this->_helper->Embed()->url;

Does anybody know why this could be happening? Am I potentially interpreting web grind incorrectly, or is it really calling the bootstrap twice when the an action helper value is tied to a partial?

I'm starting to realize how inefficient some components of Zend are.

Thanks

© Stack Overflow or respective owner

Related posts about zend

Related posts about profiling