On Wed, Mar 14, 2012 at 08:52:38AM +0000, Martin J. Evans wrote: > On 13/03/12 21:44, Tim Bunce wrote: > >On Fri, Mar 02, 2012 at 03:11:17PM +0000, Tim Bunce wrote: > >>> > >>>The second patch, which makes DBIS more efficient, is a lot more complex, > >>>and more likely to break things (especially as it's changing a bunch of > >>>macros that are directly #included by the DBD drivers. You may need to > >>>bump API version numbers; I don't understand that bit. > >> > >>I'm concerned that changing the API, and thus forcing all compiled > >>drivers to be recompiled at the same time the DBI is installed, > >>isn't worth the gain. Especially as drivers shouldn't be using DBIS in > >>any hot code anyway. > > On the other hand, I want whatever speed I can get so I am happy to > recompile any DBDs to get it. Do people like me have to do without > improvements for the sake of those who don't want to recompile their > DBDs or can it be done in some other way or opt in.
Per my recent message, implicit usage of DBIS is higher than I'd thought. The DBI will certain get Dave's improvements in some form, and yes, drivers will need to be recompiled. In fact they may *have* to be recompiled. > I don't think DBD::ODBC uses any DBIS stuff I had a (very) quick look and it loosk good. It's even using DBIc_TRACE() :) There are cases where an imp_sth is passed as a parameter yet D_imp_xxh(sth) is being called. So you end up with imp_sth and imp_xxh pointers that point to the same thing. See dbd_st_fetch and dbd_bind_ph for example. Just delete the D_imp_xxh(sth); line and change all imp_xxh in the function to be imp_sth instead. There may be cases where the same applies with imp_dbh. There are other places where internal functions use the D_imp_xxh(h) initializer but that could be avoided by passing in imp_xxh from the caller. (And by *_xxh I mean _dbh, _sth - whichever is appropriate.) > but to be sure I'd echo > Merijn's reply; if you could point out what to look for and an > approach I'd happily change any DBD I could run and provide patches > for it (currently I have ODBC, Pg, Oracle, CSV, SQLite, mysql and all > those you get with DBI). Let me know if my reply to Merijn wasn't clear or complete enough. Tim.