Perl profiling with Devel::NYTProf (the Perl profiler)

Perl profiling, perl profiler, profiling perl

Devel::NYTProf - Profiling Perl code

Speeding up your code with a feature-rich code profiler

Perl is fast, but how much faster could your Perl code be?

Finding those bottlenecks can be hard, or rather that was the case until Devel::NYTProf the modern Perl profiler.

Initially developed by Adam Kaplan at the New York Times, this module has been evolved by Tim Bunce into a phenomenal statement and a subroutine profiler. With multiple output formats from HTML reports (richly inter-linked annotation of source code, plus sortable columns and interactive treemaps of subroutine times) to KcacheGrind interactive graphical call graphs, tracing those bottlenecks is easy.

Running your code through this Perl profiler will identify which subroutines (and statements) are taking the longest or being called the most, which code is calling that subroutine and how many times. With such fine grained information available it is easy to locate and improve the performance of your code. Devel::NYTProf makes exploring the behaviour of your code so interesting that you might find it hard to know when to stop. That's one thing it won't tell you.



Article Author

Leo Lapworth