Hudzilla.org - the homepage of Paul Hudson
Contents > Writing PHP > Which IDEs are good Wish List | Report Bug | About Me ]

19.2.6     Profiling

This is NOT the latest copy of this book; click here for the latest version.

An oft-overlooked feature of IDEs is built-in profiling support. Profiling is the technique of studying the execution of your script, and reporting back how much time was spent in each function - this is absolutely crucial if you are trying to squeeze every last drop of performance out of your code. The 80/20 rule states that 80% of your program's execution time will be spent in just 20% of your code - do not spend your time optimising the 80% of your code that takes up just 20% of your execution time, because it is just not worth the effort.

Profiling helps immensely by providing a clear cut list of results: function A took up 60% of execution time, function B took up 2%. If you do not have profiling, you are as likely to try to optimise function B as you are function A, because you just might not realise how much more important function A is to your performance.





<< 19.2.5 Interactive debugging   19.2.7 Popular IDEs >>
Table of Contents
Want to see this stuff in print? PHP in a Nutshell takes the core topics covered here, adds in thousands of edits from the editorial team and myself, and combines them to make an unbeatable reference for PHP programmers at all levels.



My latest book has hundreds more tips on how to use PHP, Apache, and MySQL, plus Perl, Python, shell scripts, performance tuning, and more!



Top-right shadow
 
Bottom-left shadow Bottom shadow

Comments from other readers
Be the first to add a comment to this chapter!



Add comment
Please note that by posting a comment here you are committing it to the public domain. This is important so that others can make use of your code themselves, and also so that I can incorporate helpful notes directly into the main text. Comments are limited to 2000 characters in length.

If you are reporting an error in the content, please tell me directly.

Your name/email address:
Your comment:
 
Now, in order to verify that you're a real person, please answer this simple question: what is three plus zero?
The answer is:
(please write in
numbers, eg 19)


Top-right shadow
 
Bottom-left shadow Bottom shadow