For a specific project I was working on I found it very useful to play around a little with the various flags of 'dprofpp' to get more insight into the figures it produces. For instance
dprofpp -r -I will show you the real time spent in each subroutine + all subroutines called from this subroutine. This might provide you with more clues why specific subroutines are called this often, and if that can be avoided in somewhere in your own code. Another clue might be found in the
dprofpp -t output. This will show you a call-tree of your subroutines. If you look for your top-10 of 'expensive' routines here you can see what routine called them. In general, the 'dprofpp' manpage is quite interesting literature. ;-)
Although the database doesn't seem to be a bottleneck from the data you provide, you still can take a deeper look into the database side of this by using
dbiprof(I think this comes standard with DBI). In short:
- To profile (using bash):
DBI_PROFILE=DBI::ProfileDumper perl <your program here>
- To analyze:
dbiprof
This will give you some info on what query is executed how many times, and how mutch time it takes to do that. I used this with succes to see where I could speed things up by using extra indexes on much used columns in my tables.