RE: [PEAR] QFC: Building Forms

From: Date: Fri, 24 Oct 2003 15:14:40 +0000
Subject: RE: [PEAR] QFC: Building Forms
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8562@lists.php.net to get a copy of this message
> -----Original Message----- > From: Alexey Borzov [mailto:borz_off@cs.msu.su] > > Hi! > > Mike Carter wrote: > > I've discovered why some of my forms in the QFC are taking a while > > between clicking next/previous. One of my forms calls a > webservice to > > obtain a list of values to display in a 'select' menu element. When > > I click 'next' on that form, the next form is being > processed - BUT - > > the previous form gets built again, thus calling the > webservice again. > > > > Why do all forms get compiled everytime you move to the next page? > > Surely there is a way to optimise this building process? Of maybe > > there is something I can do to reorganise my code? Would much > > appreciate any suggestions from experienced QFC users :) > > Forms are built because QF::exportValues() method needs > element objects > to work. Is there any way I know wether the element object being built is the one which is going to be displayed? Then if it is not I could just skip the calls to webservices which cause delays and additional over head. Maybe looking at the $page variable passed in? > If the results of this webservice call are not expected to change too > often, you can implement some form of caching. Sadly they change depending on the input on the previous page - when a postcode is entered. This means I cannot really cache the values, although it might be an interesting idea to speed up accessing the remote Postcode webservice. Regards, Mike C. ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________

« previous php.pear.general (#8562) next »