Yet another excellent CPAN module that has become a standard tool for me. And remember this statement comes from a guy that is against micro-optimization and thinks that adding print statements is a debugger. In general by using Devel::NYTProf you get a clear view of where your application spends all its time. In practice I noticed that my web application spent more time on custom string encoder than with database queries. With a few changes the time was dropped from 428Âµs/call to 11Âµs/call and I can notice that in the application response times. Thanks to Devel::NYTProf I now understand what is slow in Perl (calling substr) and what is fast (a hash lookup). But as with any profiler if you are not into all the technical stuff this module is not for you.
my discovery of this module this afternoon was roughly equivalent to the discovery of controlled fire. it is almost 3 am and i am still quite awake planning where my app will go thanks to the information contained in the html report from just one hour of profiling. i had written a primitive profiling system myself but Devel::NYTProf ate its breakfast, lunch, and dinner. these are paradigmatic revelations. i am in awe of the potential of this tool's output to control the minds of management personnel who want to know how to squeeze every last cycle out of their existing hardware.
it is only once every few years that i find software that truly nails usefulness and usability simultaneously.
one word of caution: this profiler needs a clean shutdown of the perl interpreter to work its magic. don't kill your app unless it handles the signal and exits cleanly or you'll have to try again with your tail between your legs like i did.
Far too easy to waste too much time shaving extra milliseconds from your run-times once you get your hands on this module...........
It's helped me immensely when I've had to fix my software to run acceptably quickly. In the most recent case it highlighted a bug where I was effectively, and wholly unintentionally, recalculating the same data over and over.
It's always nice to reduce a 10 minute run-time to under 10 seconds.
Don't bother with other perl profilers, this is THE one. Very easy to collect profile statistics and generate connected HTML pages showing so much detail of where time is spent you will be amazed. In particular, I find the ability to locate time consuming subs, find where they were called from, see which of the callers contributed the most time and walk back up the stack very useful.
Profiling was so tedious and time consuming before and Devel::NYTProf makes is a lot easier. Thank you Adam and Tim.
I needed a bit more profiling information than Devel-Dprof offered and having read good reports about Devel-NYTProf, I gave it a try. Now I'm wondering why I never tried it sooner!
The documentation is clear, and easy to follow. Nice to have a bit of historical background in there too, to understand why the distribution was created in th first place.
The use of the HTML output, with links to statement lines, etc between pages is inspired. It has made tracing bottlenecks so much easier. It's even helped to highlight areas of code that although not bottlenecks now, are worth investigating. It allows the user to decide what's important to follow up, and not restrict them to just the slowest module/call as per Devel-DProf.
Many thanks to the guys for putting in the effort to make this distribution possible, and for making it Open Source :)