[CDBI] An optimization question
"Eric W. Bates" <[email protected]> Tue, 25 Sep 2007 13:44:45 -0400
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Organization | Vineyard.NET, Inc. |
| Message-ID | <[email protected]> |
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.
Thanks for your time.
** root@king1 ** /usr/local/www/htdocs/admin ** Tue Sep 25 12:11:09
# dprofpp
Total Elapsed Time = 790.8863 Seconds
User+System Time = 87.08949 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
13.0 11.39 11.390 930196 0.0000 0.0000
Class::Accessor::Fast::__ANON__
12.4 10.85 21.483 877871 0.0000 0.0000 Class::DBI::Column::name_lc
10.8 9.402 11.428 105375 0.0001 0.0001
Class::Trigger::__fetch_all_trigge
rs
9.61 8.367 29.833 877057 0.0000 0.0000 Class::DBI::Column::__ANON__
6.14 5.343 89.070 13459 0.0004 0.0066 Class::DBI::_flesh
4.49 3.909 3.909 15169 0.0003 0.0003 DBI::st::execute
4.16 3.621 3.621 145862 0.0000 0.0000 Class::DBI::Column::groups
3.77 3.282 8.248 15169 0.0002 0.0005
DBIx::ContextualFetch::st::_untain
t_execute
3.56 3.097 3.110 222895 0.0000 0.0000
Class::Data::Inheritable::__ANON__
3.52 3.065 6.847 112482 0.0000 0.0001 Class::DBI::_attrs
3.50 3.047 8.821 189199 0.0000 0.0000 Class::DBI::_attribute_exists
3.24 2.822 104.96 56796 0.0000 0.0018 Class::DBI::get
3.13 2.725 6.464 15168 0.0002 0.0004
Class::DBI::SQL::Transformer::_do_
transformation
2.95 2.567 6.270 74603 0.0000 0.0001 Class::DBI::primary_column
2.90 2.525 17.486 46145 0.0001 0.0004
Class::DBI::Relationship::HasA::__
ANON__
--
Eric W. Bates
[email protected]