Herkum has asked for the wisdom of the Perl Monks concerning the following question:
I was working on some code and decided to give Memoize a shot since I had run out of ideas of how to make my application faster and was using Devel::Prof to help identify problem areas. The results were great, was I able to get it to run about 6 times faster than before!I was very happy however the last part I am having problems with is having to do with database queries.
Devel::Prof tells me what methods are taking my time and how many calls there are but it does not tell me where those calls are coming from. In this case, it is telling me that the database queries are taking most of the time now but not which ones. See below...
%Time Sec. #calls sec/call F name 13.88 9.5690 522901 0.000018 EEBL::get_field 12.40 8.5473 483 0.017696 DBI::st::execute 6.49 4.4764 186739 0.000024 EEBL::_get_object 4.15 2.8622 1760404 0.000002 Scalar::Util::refaddr 3.88 2.6735 2851 0.000938 DBI::db::do 2.16 1.4885 1726 0.000862 DBI::db::selectrow_array
The two things I would like to tackle are the number of calls to are being made to refaddr(which is being called from Class::Std ident function). Is there some what I can override the exported ident?
The second is tracing where the SQL calls that are being made for DBI::db::do and DBI::db::execute.
Help? Suggestions?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Profiling and Performance
by perrin (Chancellor) on Mar 26, 2009 at 23:03 UTC | |
by Herkum (Parson) on Mar 27, 2009 at 16:16 UTC | |
|
Re: Profiling and Performance
by BrowserUk (Patriarch) on Mar 27, 2009 at 07:46 UTC | |
by Herkum (Parson) on Mar 27, 2009 at 16:11 UTC | |
by BrowserUk (Patriarch) on Mar 27, 2009 at 18:32 UTC | |
by Herkum (Parson) on Mar 27, 2009 at 19:27 UTC | |
|
Re: Profiling and Performance
by andreas1234567 (Vicar) on Mar 27, 2009 at 06:48 UTC | |
by Herkum (Parson) on Mar 27, 2009 at 16:09 UTC | |
by andreas1234567 (Vicar) on Mar 27, 2009 at 20:35 UTC |