## Friday, October 22, 2010

### Profiling perl

The main problem with perl scripts is that they get hacked too much and this generally results in them either breaking or ending up doing useless things... DProf is the older perl profiling lib, and can easily be booted from the command line via a direct call to perl with the debug option. Basically it requires no mod of your existing script(assuming the script is the standard #!/usr/bin/env perl type).

perl -d:DProf <script_file>
dprofpp


It produces a file called "tmon.out" that is processed with "dprofpp" into a human readable form. After that point its up to you to find and kill the pointless junk.