Re: QuickForm isn't
| From: | Seth Price | Date: | Wed, 11 Oct 2006 17:53:15 +0000 |
| Subject: | Re: QuickForm isn't | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-25400@lists.php.net to get a copy of this message | ||
I don't have the specific example that I was referring to (30+ seconds render), it and its traces have since been optimized/deleted.
But, 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.)
This form has 4 selects (<= 5 options each), 5 checkboxes, 5 text inputs, and a submit.
(All times seem to be +/- 0.05 secs. Yes, I realize that enabling and disabling chunks of code is not how you are supposed to profile.)
I don't really like the idea of re-inventing the wheel either. After receiving Bertrand's private response and not wanting to repeat the problems that I had with the *other* bertrand, I decided "If you want something done right, do it yourself." Besides, from the sound of it, there is little chance of getting a working QF2 in the timeframe I need. I had already read through the Wiki, and with Bertrand's response I can say that there are features which we disagree on. And a person can spend many heated hours wrapped up in the politics of it all, which quickly tires me. The PEAR standards slow compile time on multi-object packages also, mostly due to each class being in its own file and having to call require_once() a lot. But I digress...
I've "cherry-picked" QF and QF2 wiki for implementation ideas, they are free to do the same. I suspect that there will be things that we disagree on, though.
~Seth
On Oct 11, 2006, at 10:26 AM, Ian Warner wrote:
Seth Price wrote:When I initially started having problems last year, I started extending the base classes to get the functionality that I wanted. After a significant amount of work, I was able to fix a few of my complaints. But I started to find things that couldn't be fixed without patching the main code, and then I started to tweak things where I knew that it would need much more work past the functionality that I used. And while rooting through the code, it had just gotten to the point where I felt that I was only adding more bloat that was causing me problems in the first place. Somewhere in there I gave up on something that others could use, and started working on something that would get me through my project. I was pretty sure I sent in patches somewhere, but I can't find an email where I did, so maybe I didn't. To show that I am not completely full of shit, here is a link to my package (no warranty provided with code, if I never think about it again it would be too soon, good luck): http://pricepages.org/temp/QuickForm.zip I suppose that I should issue a public apology for the rant part of the rant. I had just wasted two days fighting with QuickForm, my tendonitis was coming back, and I was getting frustrated. This is after I spent several weeks last year fighting with it. Bertrand, Alexey, thanks for all your hard work on QuickForm, it really is appreciated in my own special way. But yes, the simplest quickform usage noticeably slows down the page. A complex form is like a DOS attack on my computer. Maybe it's just due to Mac's poor LAMP performance (which is also very true), and my computer is old anyway, but do I see the same problem when I upload the script to the Linux server. I wish that I kept some of my APD traces so I could show you. I called QF2 vaporware because I saw no package available for download on PEAR (even if alpha quality), doesn't everything condense from vaporware? Maybe my terminology is just confused? That all said, after I recieved the first responses to my rant I started working on my own Form class. It won't be as full featured (or as complex) as QF or QF2, but it should do what I want with the minimum of extra code. I'm basing it on designs in QF and QF2, and you are free to use any of my code, but at the moment it is vaporware. ;) If there is interest, I'll post it to the list when it's usable. ~SethSeth One thing i am surprised to hear about is the performance of Quickform, please check this form - hosted East Cost US http://www.chinasavvy.com/contact/product-enquiry.php Now it displays really fast for me = based in Tokyo, T1 optic connection though :) This form is heavily bloated with "8" menus, two of them full country lists - the site was also designed using Tables - (I only did the form and back end admin) The form is also validated with Javascript through quickform. So this is a pretty intense use of quickform really for one display. Anyway loads just as fast as a normal forms seem to load anywhere else in my opinion! If you give us specifics that you are trying to achieve - snippets oc code and end product then we can help with that. I like a good rant myself - but I really don't see why you are working on your own code now, talk to Alexey or Bertrand and ask for a QuickForm2 branch to work on your stuff then they can merge of possibly use your edits. Redoing the wheel wont help PEAR that much - and thus wont help me so speaking selfishly please try and communicate the issues. Cheers IanOn Oct 10, 2006, at 11:53 PM, Paul Scott wrote:--PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpOn Wed, 2006-10-11 at 01:00 +0200, Bertrand Mansion wrote:Seth Price wrote:After reading your tirade, and Bertrand's answers, I actually physically shook my head in amazement. If you have all of these gripes, why not start submitting patches? You would soon see that most of your complaints were erroneous to start with. I find it laughable that you seem to think that these things should be fixed for your personal consumption by the people that initially took time out of their busy lives to create something that you are now bitching about. Did you donate to the developers? How many items on Bertrand's wishlist did you fulfil? I am going to now have a pot of coffee, maybe then I will be in a better mood. --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm --PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpI find myself drawn to QuickForm because I like the idea. Create elements, define rules for them, add them to a form, and it does the rest for you. It should be that simple. But I find myself fighting with it. I feel like I should be able to develop faster, but I get the feeling that I would have been better off without "Quick"Form.