[CDBI] C::DBI Memory usage
Matt S Trout
dbix-class at trout.me.uk
Wed May 24 16:14:13 BST 2006
Aaron Trevena wrote:
> On 24/05/06, Matt S Trout <dbix-class at trout.me.uk> 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 :)
> 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.
More information about the ClassDBI