Re: QuickForm slowness with many checkboxes
| From: | Alexey Borzov | Date: | Mon, 14 Mar 2005 21:55:17 +0000 |
| Subject: | Re: QuickForm slowness with many checkboxes | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-18037@lists.php.net to get a copy of this message | ||
Hi,
Phil Gyford wrote:
I'm using HTML_QuickForm and DB_DataObject quite happily with Smarty, and all's mostly going well. However, one form I'm working on has a checkbox set with around 250 checkboxes (yes, I know it's a lot). It works OK, but it does take more than 20 seconds for QuickForm to "accept" the form! This is on a server on my laptop, so a real server will be faster, but it does seem excessive! Is this to be expected? Without the checkbox set the call to $form->accept() takes around 2 seconds (it has quite a lot of elements). With the checkboxes, it takes at least 20. Have I done anything obviously wrong in these bits of code that would make it so slow...?Looks like the problem is within ArraySmarty renderer. It uses the Smarty eval plugin to output the labels and elements. This effectively means that label templates are re-parsed on output of every element. I'm no Smarty expert, though, so lets wait what the renderer author has to say.