Re: Optimising FormBuilder database access for linked fields

From: Date: Thu, 09 Feb 2006 22:03:13 +0000
Subject: Re: Optimising FormBuilder database access for linked fields
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22901@lists.php.net to get a copy of this message
>>When a table is used as a linked field in FormBuilder, the values of interest >>are those describied in the linkDisplayFields for that table, and the primary >>key. >> >>However, FormBuilder queries all of the object's fields when creating the form. At >>times this can add a certain overhead to the execution time ! >> >> >Go ahead and make a feature request so that this doesn't get lost. > > I have ;). I also wrote a patch (attached) to fix this - it doesn't cover all cases (in particular, if linked fields are themselves linked fields) but helps in the general case, and doesn't hurt (as far as I can tell - though I am quite foreign to the internals of FormBuilder!). Using this, the query for my problematic drop down has gone down from 1.05 seconds to 0.24 seconds ! Anselm

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