Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPImpact Blog:
Zend_Form Performance Issues
Jul 07, 2008 @ 10:21:14

On the PHP::Impact blog, there's a new post mentioning some of the problems that he (Federico) has run into when his Zend_Form forms got larger and larger - performance.

If you are using Zend_Form and your site increases in complexity and attracts more traffic, you are most likely to run into performance problems. Of course, bigger and more complex projects result in more load on your servers. [...] In this post I'll explain the problems I faced when using Zend_Form and how I managed to optimize it and improve the performance of my application.

He ran a few tests against his code and found out that one of the biggest causes of overhead was the many calls to other components in the framework to handle different parts of the output. His solution was to modify the Zend_Form_Elements component to check for dependencies before the form is executed. Pre-loading like this prevents the high-overhead (and repetitive) dynamic loading later on.

tagged: zendframework component form zendform performance issue load