Re: QuickForm isn't
| From: | Justin Patrin | Date: | Wed, 11 Oct 2006 20:02:13 +0000 |
| Subject: | Re: QuickForm isn't | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-25406@lists.php.net to get a copy of this message | ||
On 10/11/06, Seth Price <admin@pricepages.org> wrote:
I realize that the name attribute will normally accept "[]", but it
strikes me as more work to keep separate name and id attributes then
to force everything to work with the valid ID chars. I see what you
mean about the name attribute != NAME DTD token. The confusing text
is here:
http://www.w3.org/TR/REC-html40/types.html#type-name
I'm using the an extension of the regular Array renderer, then just
passing that to Smarty. The extension provides nested group support,
better label support, and access key support.
The only additional code that is loaded between 0.50 secs and 0.85
secs is:
require_once 'HTML/QuickForm/checkbox.php';
require_once 'HTML/QuickForm/text.php';
require_once 'HTML/QuickForm/submit.php';
As was mentioned earlier, a bytecode cache would probably be of help
to you. Of course, a slow computer is a slow computer whatever you're
doing and 0.35s really isn't that long to wait....
I would also suggest looking at Structures_Form, which is an alternate
form package that was recently accepted. I don't recall if it has an
HTML output subpackage as yet but it may be more in tune with what you
want.
~Seth On Oct 11, 2006, at 1:16 PM, Alexey Borzov wrote: Hi, Seth Price wrote:-- Justin PatrinWere you using ArraySmarty renderer, by chance?I don't have the specific example that I was referring to (30+ seconds render), it and its traces have since been optimized/deleted.Well, the numbers you provided show clearly that most of the time is spent on loading and parsing the PHP files. Install some bytecode cache. -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpBut, as an example, the page I'm working on now takes ~0.25 seconds to render when there is no content. (PowerMac G5, ~2GHz, faster than my normal dev machine) This is when require_once()ing my extension of Smarty, and a custom mapping class which is 5k+ lines of code. When I require_once() my extension of QuickForm, similar to what I previously linked to, the render time (with no QF creation) doubles (~0.50 secs). This is a good part of that code bloat that I ranted about. If I then create the form (no QF validate()), the time jumps again to ~0.85 seconds. If I then validate(), render, and print my QuickForm, the time increases marginally (~0.88 secs). That's *triple* my render time when I _only_ have the overhead of PEAR's DB connection, map object creation, and a Smarty include()/fetch(). (Note that the validation is only partially implemented, due to afore mentioned problems with QuickForm rules. Actual validation time would be even greater.)