[Spam] Re: [wp-hackers] DB connections
Michael D Adams
mikea at turbonet.com
Tue Aug 8 09:56:45 GMT 2006
On Aug 8, 2006, at 1:25 AM, Matt Mullenweg wrote:
> Aubrey Kilian wrote:
>> Anyway, the article basically goes on to say that a method called
>> "Lazy Loading" should be used to only create a connection to the
>> database if a query is actually executed against the database. With
>> the current way that wordpress works, that would be every single page
> The patch doesn't look bad. I think something like this is already
> in the MU db class.
It's possible some plugins use the wpdb class to connect to a
different database with different username/password. For backward
compatibility in such a case (albeit edgy), we'd need to instantiate
with the db constants rather than with the nicer looking no argument
method that the patch  uses.
But that would mean storing the arguments passed to wpdb in some
local variables, multiplying the number of places db username/
passwords are stored. Good/Bad/Doesn't matter?
 (from Aubrey Kilian's link) http://jpipes.com/source/wordpress-
More information about the wp-hackers