[Vtigercrm-developers] UIType 16 Picklists (again)...

Adam Heinz amh at metricwise.net
Wed May 15 14:50:11 UTC 2013


No, your instincts are right.  It would be much better not to hit the
database again; in a robust multi-webhead setup, the database server is a
separate machine, so you pay network time for every database call.  In this
case, I didn't want to break the interface of that function, and that
function doesn't know uitype.  I took on some technical debt to keep my
merge cost lower.  One possible way to split the difference would be to put
a static variable in that function and fill that cache with tablename =>
uitype.  That would at least get you down to one extra database call per
request, from one per picklist.


On Wed, May 15, 2013 at 2:42 AM, Alan Lord <alanslists at gmail.com> wrote:

> On 14/05/13 18:29, Adam Heinz wrote:
>
>> *SHOW COLUMNS FROM vtiger_$tablename LIKE 'sortorderid*
>>
>
> That's a neat idea, thanks.
>
> My reason for thinking of making a decision earlier in the flow in
> getPicklistOptions() is that "$this" already has the uitype value so I
> could choose the right query without having to first make *another* query
> to the db to find out.
>
> But maybe it really makes little difference in the overall scheme of
> things?
>
> Al
>
>
>
> ______________________________**_________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20130515/8fd39e8e/attachment.html>


More information about the vtigercrm-developers mailing list