Re: [CDBI] C::DBI Memory usage

Matt S Trout <dbix-class-uY5y5/[email protected]>
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
Aaron Trevena wrote:
> On 24/05/06, Matt S Trout <dbix-class-uY5y5/[email protected]> wrote:
>> > I'm working on scheduling daemon in perl, it uses C::DBI to handle
>> > DB/Object Persistence, etc as you'd expect.
>>
>> These days I'd expect DBIC or RDBO, but hey, if you enjoy the legacy
>> thang :)
> 
> Meow!
> 
> The time to learn a new ORM to the level required isn't available,
> CDBI has JustWorked(TM) so far.
> 
> Have you any gurantee your trendy new ORMs are likely to prevent this
> problem - I'm guessing you haven't done any memory benchmarking over
> several days.

No, but a number of my users have, and bar the problems implicit in 
using prepare_cached I believe the results were quite promising.

>> Second, get yourself a copy of Test::Memory::Cycle (and currently
>> Devel::Cycle 1.04 since 05 and 06 have a slight issue - or look at the
>> DBIx::Class list for how to tweak a more recent one to work happily) and
>> start lobbing cycle tests at everything in sight.
> 
> I tried this and it wasn't at all helpful - I'll give some of the
> older ones a go.

1.07 is now out which fixes the bug.

> Whenever I've tried to watch the memory usage of individual variables
> I've been overloaded with hundreds of them unable to see clearly what
> is increasing or decreasing - let alone patterns responsable for
> memory usage over time.

You might also want to poke at Devel::Leak.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.