[CDBI] Re: Use of _remember_handle in db_Main causes slowdown/huge memory use

Edward J. Sabol sabol at alderaan.gsfc.nasa.gov
Wed Oct 19 15:22:31 BST 2005

David Jack Olrik writes:
> This will make class variable __Database_Names grow each time db_Main
> is called which is bad.

Good catch!

> Under mod_perl this it will not leak/slowdown much, except when we
> lose the connection to the database, and _remember_handle is called
> again.

That's probably why no one noticed this before. Presumably, only mod_perl
programmers were using Perrin's db_Main() fix.

> Moving __PACKAGE__->_remember_handle('Main'); outside of db_Main fixes
> the problem.

I agree.

> If no-one objects I'll update the wiki...

Go for it.

> Perrin: Any comments ?

I don't think Perrin ever joined the new CDBI mailing list. He hasn't posted
until after the transition, so I suspect he hasn't. You might want to e-mail
him directly.


More information about the ClassDBI mailing list