[CDBI] An optimization question

Matt S Trout dbix-class at trout.me.uk
Tue Sep 25 19:12:48 BST 2007


On Tue, Sep 25, 2007 at 01:44:45PM -0400, Eric W. Bates wrote:
> I have a fairly critical program which takes a LONG TIME to run and I 
> would like to make it faster.
> 
> When I run it thru the profiler, it appears that most of the top 15 time 
> consumers are in Class::DBI, but I am a DProf n00b.
> 
> How do I distill all the various Class::DBI calls back to my code?
> 
> e.g. somehow 900,000 calls to name_lc seems excessive when the core 
> program is handling something on the order of 850 records. But the 
> documentation for name_lc basically says "you don't need to know about 
> this"; so it's not clear why I'm calling it so frantically.
> 
> Same goes for __ANON__, __fetch_all_triggers, et al.

Doesn't surprise me overly - a lot of the CDBI inflate and accessor stuff
hits a -lot- of internal methods.

DBIx::Class and Rose::DB::Object both have substantially different designs
for that stuff pretty much to improve performance in that area.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/



More information about the ClassDBI mailing list