[Vtigercrm-developers] Next Release of vTiger

Enrico Weigelt weigelt at metux.de
Tue Sep 25 12:14:41 PDT 2007


* Joey Novak <joey.novak at gmail.com> schrieb:

> I am not trying to argue...  But, I really didn't find adodb all that
> complex.  There are three or four functions that it uses, and that is it.

Did you have a deeper look into the adodb source (at least the one
shipped w/ vtiger) ? 

There're such neat things like just retrieving a list of rows is 
done by first counting the rows then fetching them one by one w/
absolute positioning, which requires some kind of cursors or at 
least buffering of the whole result set. The calling code then
fetches the records via upcounting index. 

The key problem is: treating the result set as an array instead
of an stream, and this breaks normal sql access schemes.

I regocnized that problem while trying to port to postgresql:
the driver (in the shipped adodb version) didn't support absolute 
result record addressing for postgresql. Yes, I simply could 
implement this (obviously jens fixed it, but I wasn't aware of
that this time), but I wanted to get rid of the unclean coding 
and performance impact.

> With a few modifications to make it always use the associative 
> array return values, instead of index based.  

Right, that's the key point. But since the code structure of that
certain adodb version seemed very complex and unclean to me, I 
chose to circumvent it and use pear::db instead.

> And a way to do different queries depending upon the dbms (there 
> are only a few that it would be easier if they could be different, 
> most can be the same).

Yeah, this requires some more hi-level functions, which can be 
implemented by each driver individually. I've implemented a few
of them. For example, ::sql_concat(), which renders concatenation
from an list. 

> As for performance, I didn't see very much in the adodb code that
> would slow things down.  Although I may have missed something.

A deeper look into it's code flow should enlighten you ;-P


cu
-- 
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 cellphone: +49 174 7066481   email: info at metux.de   skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------



More information about the vtigercrm-developers mailing list