drifter Posted December 20, 2006 Share Posted December 20, 2006 OK I use the pear DB class - I have for a long while, so I have many many places that call it. I do however only call the basic methods such as query() - I do not use any of the stuff such as prepare() So it really comes down to me using only about 25% of the functions.So how much would I gain by trimming this down or rewriting a drop in class that only uses the needed calls. Would that make a big difference?The same thing for Smarty - I only use a small part of it. I would really like to strip it down a lot, but it is a lot of work if does not make a big difference.thanks Link to comment https://forums.phpfreaks.com/topic/31417-pear-db-class/ Share on other sites More sharing options...
c4onastick Posted December 20, 2006 Share Posted December 20, 2006 I've been using PEAR DB forever too. I've often contemplated that also, but you know, there's really no reason to re-invent the wheel. I doubt you'd really see that much of a performance gain by stripping it down a bit, only in incredibly stressed environments. It may help a little bit to cut out all the calls to databases you don't use (I only use MySQL), but if I every migrate to another database I wont have to change much in my code to make the switch. I [b]am[/b] going to get around to adding 'stripslashes()' to the output from:[code]$res->fetchInto();[/code]They have some form of 'addslashes()' running around in there, but why they never included the corresponding 'stripslashes()' for the output is beyond me and has always annoyed me. Link to comment https://forums.phpfreaks.com/topic/31417-pear-db-class/#findComment-145447 Share on other sites More sharing options...
drifter Posted December 20, 2006 Author Share Posted December 20, 2006 well I am debating... As long as I keep a middle class and do not have php mysql commands in my code, switching should not be too bad.I also have a script that does about 100,000 inserts/updates in a row. I use the query() method and I have noticed that my memory keeps going up with every call - by about 4,000 likes I am at 50% ram - so I ended up putting a mysql_query() in my code which did not make me very happy. I was looking and I can not really clean up what they have because it is so complicated and all the functions are tied together. - I could just ad another method for the insert/update that is very simple, or if I am going to go that far, should I just do something like start with ezmysql from phpclasses.org and modify that to be drop in. Link to comment https://forums.phpfreaks.com/topic/31417-pear-db-class/#findComment-145452 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.