[Dbix-class] Mod_perl Checklist?

Matt S Trout dbix-class at trout.me.uk
Tue Aug 22 19:08:36 CEST 2006


Nathanial Hendler wrote:
> I've begun using DBIx::Class in an Apache 2 mod_perl environment and was
> wondering if there was a checklist of things to do or check in order to
> make sure I'm getting the best (or in that direction) performance out of
> DBIx that I can.

Make sure Apache::DBI isn't loaded (not a performance issue, it can cause bugs 
because it does some nasty hackery to make naive DBI scripts work, which 
doesn't work so well with something as smart about dbh handling as DBIC)

> I'm finding that my scripts using DBIx take .3 seconds to load the
> schema.  Once that's done, the speed of DBIx seems ok.
> 
> Also, is there any sort of benchmarking or debugging that can be turned
> on to have DBIx::Class report where the bottlenecks are, or what queries
> it's executing?

Have a look at DBIx::Class::Storage::Statistics, which is how DBIC_TRACE is 
implemented; you can do selective benchmarking trivially by subclassing that.

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Dbix-class mailing list