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

[prev] [thread] [next] [Date index for 2005/10/19]

From: Edward J. Sabol
Subject: [CDBI] Re: Use of _remember_handle in db_Main causes slowdown/huge memory use
Date: 14:22 on 19 Oct 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.

Later,
Ed

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

(message missing)

[CDBI] Re: Use of _remember_handle in db_Main causes slowdown/huge memory use
Edward J. Sabol 14:22 on 19 Oct 2005

Generated at 19:52 on 24 Oct 2005 by mariachi v0.52